Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
JimAmigo
Posting Yak Master
119 Posts |
Posted - 2004-07-13 : 15:45:16
|
| I am trying to convert an MS Access update query to SQL Server.UPDATE tbl_FrockedDOR2 INNER JOIN tbl_Roster ON tbl_FrockedDOR2.SocialSecurityNumber = tbl_Roster.SocialSecurityNumber SET tbl_Roster.DateOfRank = [tbl_FrockedDOR2].[Frocked Date of Rank], tbl_Roster.SelectionYear = [tbl_FrockedDOR2].[Frocked Selection Year];I get this error:Server: Msg 156, Level 15, State 1, Line 1Incorrect syntax near the keyword 'INNER'.Is there differnt syntax for this type of join?Any help would be greatly appreciated. |
|
|
Arnold Fribble
Yak-finder General
1961 Posts |
Posted - 2004-07-13 : 15:58:15
|
| The syntax of UPDATE in SQL Server and Access differ somewhat. The join essentially stays the same. So what you want here is:UPDATE tbl_RosterSET DateOfRank = [tbl_FrockedDOR2].[Frocked Date of Rank], SelectionYear = [tbl_FrockedDOR2].[Frocked Selection Year]FROM tbl_FrockedDOR2INNER JOIN tbl_Roster ON tbl_FrockedDOR2.SocialSecurityNumber = tbl_Roster.SocialSecurityNumber |
 |
|
|
JimAmigo
Posting Yak Master
119 Posts |
Posted - 2004-07-13 : 16:09:32
|
| I would agree the SQL Sever Syntax makes more logical sense. But I am learning.. It seems to work your help is mostly appreciated Arnold.! |
 |
|
|
|
|
|