October 10, 2009 at 9:02 pm
I want to do,
For the rows, wherever profile id's of both tables are same, check if p.visited is null, if it is not null then update the status id in the other table with the same profile id
UPDATE profiles_submitted
SET ps.StatusID = 2
FROM profiles p, profiles_submitted ps
WHERE p.ProfileID = ps.ProfileID and p.Visited is not null
I get the error:"The multi-part identifier "ps.StatusID" could not be bound"
Help me..
October 11, 2009 at 3:56 am
Not sure what you are trying to achieve with this, but syntax would be this,
UPDATE PS
SET ps.StatusID = 2
FROM profiles p, profiles_submitted ps
WHERE p.ProfileID = ps.ProfileID and p.Visited is not null
---------------------------------------------------------------------------------
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply