|
I'll bet you guys are getting tired of me asking SQL questions, aren't you? <g> Up to now, all my embedded SQL has been cursor driven. However I have one now where I want to join 2 files and output the result set into another file. Since SQL is set-at-a-time, I didn't see a reason to use a cursor, just slam the whole result set out there. The statement I'm wanting to execute is this: Insert into AUTHITEM (Select c.*, i.* From NXCHNBIL C Join NXITMMST I On c.ITNBR = i.ITNBR Where c.ACREC = 'A' and c.CUSNR = 0509 and c.CHAUT in ('2', '8', '9')) It gives me an error saying field QSUN2 doesn't map properly. My guess is that it is mapping the fields based on order, and I want to map based on field name. Am I right on the error? And is there a way to map by field name without specifying each? File AUTHITEM has 100+ fields, some from each of the other 2 files, but not nearly all fields. Thanks.
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.