02-08-2010 12:12 PM - edited 02-08-2010 12:13 PM
I’ve got 2 tables that I am working with here. One is the Account table and the other is the Account Extension table. I want to take the AccountmangerID (String-12) from the Account table field and insert that value into the Area_Sales_ManagerID (also String-12) in the Account Extension Table where the AccountmangerID from the Account table is equal to U6UJ9A00002K.
I’ve used the following code but the “Where” statement causes SLX to return a “Failed to parse SQL –“ command.
SET AREA_SALES_MANAGERID = 'U6UJ9A00002K'
WHERE accountmanagerid IN
(SELET accountmangerid from ACCOUNT
WHERE accountmangerid = 'U6UJ9A00002K') ;
If I take out the “Where” command, the command works, but then wants to change over 8,000 records which isn’t a good thing. I’m looking in the neighborhood of 202 records to be changed.
So, in a nutshell, since I’m not a SQL guru, let alone a novice, what am I missing?
As always, thanks in advance and appreciate the help/another set of eyes looking this over.
Solved! Go to Solution.
02-08-2010 12:51 PM
How about something like:
set area_sales_managerid = 'U6UJ9A00002K'
where exists (select accountidfrom account where account.accountid =
and account.accountmanagerid = 'U6UJ9A00002K')
This is assuming that the account and account_ext table are linked by the accountid