I have the following general ledger accounts:
Each account contains--as its description--"Test Account".
I need for the description to instead read "USA - 'last segment of the account number'".
So, the two accounts above would have the following descriptions respectively:
USA - 00
USA - 01
So, I created two update statements. Here is the first one that ran successfully:
UPDATE GL00100 set ACTDESCR = 'USA' where ACTNUMBR_2 = 'TEST'
Then, I ran a second update statement which produced a "subquery cannot return more than one value" error:
UPDATE GL00100 set ACTDESCR = (select actdescr from GL00100 where ACTNUMBR_2 = 'TEST')+' '+'-'+' '+(SELECT ACTNUMBR_3 FROM GL00100 where ACTNUMBR_2 = 'TEST')
where ACTNUMBR_2 = 'TEST'
I know that there are several of the same "where" clauses. But, I'm trying to be careful not to update all account numbers in GL00100.
Anyway, how do I get the second update statement to work?