Link to home
Start Free TrialLog in
Avatar of wd006451
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'.
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

this is the syntax:
 
UPDATE PMGTask
SET FK_PMGProjectID = B.PK_PMGProjectID
FROM PMGTask A
JOIN PMGProject B
  ON B.Number = A.FK_PMGProjectID
ASKER CERTIFIED SOLUTION
Avatar of Jeff Tennessen
Jeff Tennessen
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
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...
angelIII: Yeah, that's what finally clued me in. I need to read the posts more thoroughly before replying!

Thanks,

Jeff