|
Hi All, I am trying to update a filed in file A based on a condition in file A and a condition in file B using STRSQL. Following is the statement that I am using; UPDATE NCTSF/"RNK.PCTG" SET pcvbch = 0 WHERE pcvbch <> 0 and (digits(PCYEAR) concat digits(PCSKEY)) in (SELECT (digits(PCYEAR ) concat digits(PCSKEY)) from NCTSF/"RNK.PPAR", NCTSF/"RNK.PCTG" WHERE PPYEAR = PCYEAR AND PPSKEY = PCSKEY AND PPROLL <> 'V') It seems like it is trying to do the update, but the problem is that it just keeps going and going like it has a cartesian join or something. I have about 13,000 records in each file and although file A has more that one record that matchs file B, file B is unique on these fields. I am getting a count 500,000 and it was still going. We are using this on a box at V4R4. Any suggestions what may be going on. TIA Ron
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.