March 20, 2003 at 1:21 pm
Hi,
I need to update a table with data from the same table. This is what I want to do:
UPDATE AP_FTS_Working
SET FTSTab = '1',
ReferenceTN = W2.TN
FROM AP_FTS_Working W INNER JOIN AP_FTS_Working W2
ON W.Acct_No = W2.Acct_No
WHERE W2.FTSTab = '0'
AND W.FTSTab IS NULL
However, I get the following error:
Server: Msg 8154, Level 16, State 1, Line 1
The table 'AP_FTS_Working' is ambiguous.
Could you help please?
Thanks,
VP
March 20, 2003 at 1:27 pm
UPDATE W
SET FTSTab = '1',
ReferenceTN = W2.TN
FROM AP_FTS_Working W
JOIN AP_FTS_Working W2
ON W2.FTSTab = '0'
AND W.FTSTab IS NULL
AND W.Acct_No = W2.Acct_No
March 20, 2003 at 1:36 pm
Thanks mromm, that worked 🙂
VP
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply