How can I update a file with the same name (and fields) from one library to another?
This is my SQL statement:
UPDATE m3fdbqa5/oagrhe set uychid = 'TESTSQL',
uysmcd = (SELECT uysmcd FROM mv4cdta001/oagrhe
where mv4cdta001/uycono = m3fdbqa5/uycono
and mv4cdta001/uyagno = m3fdbqa5/uyagno
and mv4cdta001/uycuno = substr(m3fdbqa5/uycuno,2,9))
The file in the MV4 library has the updated uysmcd field that needs to be copied to the same field in the M3 library. The uycuno field is off by one character, thus the substr function.
When I run the command I get this error message:
Column or global variable MV4CDTA001 not found.
Any suggestions would be appreciated! Thanks, CLK