wd006451
asked on
Any suggestions
UPDATE PMGTask A
SET A.FK_PMGProjectID = (SELECT
B.PK_PMGProjectID
FROM PMGProject B WHERE B.Number = A.FK_PMGProjectID)
Msg 102, Level 15, State 1, Line 86
Incorrect syntax near 'A'.
Msg 156, Level 15, State 1, Line 92
Incorrect syntax near the keyword 'FROM'.
SET A.FK_PMGProjectID = (SELECT
B.PK_PMGProjectID
FROM PMGProject B WHERE B.Number = A.FK_PMGProjectID)
Msg 102, Level 15, State 1, Line 86
Incorrect syntax near 'A'.
Msg 156, Level 15, State 1, Line 92
Incorrect syntax near the keyword 'FROM'.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Whoops! I got here via Microsoft > Development > MS Access > Queries (SQL), so I mistakenly assumed that this forum was Access-specific. For SQL Server and other RDBMSes, angelIII is quite correct. My apologies for being a dunce!
Jeff
Jeff
JTennessen: no worries. the question is actually cross-posted to the 2 zones.
the error message in fact indicates "clearly" that's sql server and not access...
the error message in fact indicates "clearly" that's sql server and not access...
angelIII: Yeah, that's what finally clued me in. I need to read the posts more thoroughly before replying!
Thanks,
Jeff
Thanks,
Jeff
UPDATE PMGTask
SET FK_PMGProjectID = B.PK_PMGProjectID
FROM PMGTask A
JOIN PMGProject B
ON B.Number = A.FK_PMGProjectID