|
Hi, Just try the following: INSERT INTO CRLIB/fileA values((select code, 'DISC' from CRLIB/fileB exception join CRLIB/fileA on code=acode)) Mit freundlichen Grüßen / Best regards Birgitta Hauser "Shoot for the moon, even if you miss, you'll land among the stars." (Les Brown) "If you think education is expensive, try ignorance." (Derek Bok) "What is worse than training your staff and losing them? Not training them and keeping them!" -----Ursprüngliche Nachricht----- Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im Auftrag von colin reid Gesendet: Friday, February 16, 2007 12:28 An: rpg400-l@xxxxxxxxxxxx Betreff: Sql insert multiple records An SQL probIem, I want add records from fileB into fileA where they don?t already exist in fileA. But I gather the Insert command is a bit funny about inserting more that 1 row? There are only 2 fields, I want to add the product code which will be obtained from fileB and the 2nd field is just some fixed text ("DISC") My current script is? INSERT INTO CRLIB/fileA values((select code from CRLIB/fileB exception join CRLIB/fileA on code=acode),'DISC') Any help would be appreciated. On another matter, I don?t suppose anyone knows if it is possible to convert AS400 query definitions into their equivalent SQL commands (a bit of a long shot I think?!) Many thanks, Colin. --------------------------------- What kind of emailer are you? Find out today - get a free analysis of your email personality. Take the quiz at the Yahoo! Mail Championship.
As an Amazon Associate we earn from qualifying purchases.
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.