Hi guys,

Trying to do more in SQL (still a novice), and trying to do something in
particular with an
INSERT.

Im trying to insert transactions into table2 from table1(duplicate structure
to table2 - diff contents),
based on master records existing for table2 ( so i dont get orphan
transactions..)


Below is code i sort of tried in ISQL. Didnt work.

INSERT INTO IAN.CUSPD00F2
SELECT * FROM IAN.CUSPD00F WHERE
(SELECT * FROM IAN.CUSPD00F, IAN.ARTMS00F2
         WHERE BCDKE1 = ZCDKE1 AND
                      BCDKE2 = ZCDKE2 AND
                      BCDKE3 = ZCDKE3 AND
                      BCDKE4 = ZCDKE4 AND
                      BCDKE5 = ZCDKE5)



Couldnt find examples quite what i was after, so any help would be
appreciated.



Regards


Ian Scotson.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

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.