|
First, you are missing a WHERE clause. You better have one. Dynamic SQL is great, but can impact performance. Be nice to see if you could do something like the following (which I haven't tried) (sample is V5R4) exec sql Update $AUDITSTG/SAVHISTORY case FileFieldValue<>:HostFieldValue Set FileFieldValue=:HostFieldValue ... where ...; But, if it doesn't and you continue to use "dynamic" SQL (suggested search words or important concepts are double quoted) then you'll need to do one of the following two solutions "PREPARE" a statement "EXECUTE" a statement or "EXECUTE IMMEDIATE" a statement like exec sql prepare stmt1 from :SelectTwo; exec sql execute stmt1; or exec sql execute immediate :SelectTwo; Rob Berendt
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.