× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Right, Tom. But, of course, you need to have populated the intermediate table somehow. ;-)

It seems that the mechanism for adding multiple records exists in the engine, since both the MODS RPG process and the subselect process are handled.

Right now, the place I'd find the unsupported syntax to be helpful is in interactive SQL, when I'm trying to populate a file for testing. I've been reading Celko's "Smarties" book, and it'd be a lot handier to be able to copy/paste the multiple row syntax than to bring in each row separately.

Regards

Vern

At 03:34 AM 6/13/2003 -0400, you wrote:
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 thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.