|
Can't multi-row INSERTs also be effected by INSERTing values via a subselect? By having the values loaded into an intermediate table, it's similar to loading from an array though maybe not as convenient in a program when the values are already available.
Tom Liotta
midrange-l-request@xxxxxxxxxxxx wrote:
> 5. RE: Multi-row insert in SQL (Chevalier, Rick) > >You can do it if the SQL is embedded in a program. I know you code mostly C >but in RPG you would use a multiple occurrence data structure. > >-----Original Message----- >From: Vern Hamberg > >Anyone know if or when iSeries SQL will have a multi-row INSERT? > >INSERT INTO tab_comp VALUES (item1, price1, qty1), > (item2, price2, qty2), > (item3, price3, qty3) > >instead of > >INSERT INTO tab_comp VALUES (item1, price1, qty1) >INSERT INTO tab_comp VALUES (item2, price2, qty2) >INSERT INTO tab_comp VALUES (item3, price3, qty3)
-- Tom Liotta
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.