Just in case the OP does not notice.... The recommended change given here should have left the WHERE unchanged. The length of the blank literal did not match the substring length in the given, but the length of the substring was as expected. That is because the originally stated requirement implies that the substring in the WHERE clause must maintain the for-length-of-eight characters; i.e. noted originally, "position 6 to 12 is blank" must be true, in order for the UPDATE to take place.

Regards, Chuck

i5 wrote:
UPDATE MYLIB/MFFILE SET myFLD = concat(substr(myFLD,1,5) , '0000')
where substr(myFLD,6,4) =' '
Shaheen Ahmed wrote:

UPDATE MYLIB/MFFILE SET substr(myFLD,6,4) ='0000'
where substr(myFLD,6,8) =' '
This is not working. Got error message
"Token ( was not valid. Valid tokens: =. "

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-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.