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 |
|
misterzr
Starting Member
49 Posts |
Posted - 2005-06-16 : 17:31:24
|
I am trying to update data in one column with data from another column in another database. The SQL looks right but will not run. I get an error near INNERThis is the query I am trying to rundbo and PRODDTA are the owners of the 2 databasesUPDATE dbo.F4101BUMAY24 INNER JOIN PRODDTA.F4102BUMAY27 ON dbo.F4101BUMAY24.IMLITM = PRODDTA.F4102BUMAY27.IBLITMSET dbo.F4101BUMAY24.IMAITM = PRODDTA.F4102BUMAY27.IBAITM |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-06-16 : 17:37:26
|
| UPDATE f1SET IMAITM = f2.IBAITMFROM dbo.F4101BUMAY24 f1INNER JOIN PRODDTA.dbo.F4102BUMAY27 f2 ON f1.IMLITM = f2.IBLITMFor more information, check out UPDATE in SQL Server Books Online.Use aliases to make your queries more readable.Tara |
 |
|
|
Thrasymachus
Constraint Violating Yak Guru
483 Posts |
Posted - 2005-06-16 : 17:38:33
|
| looks can be decievingUPDATE dbo.F4101BUMAY24 SET dbo.F4101BUMAY24.IMAITM = PRODDTA.F4102BUMAY27.IBAITMFROM dbo.F4101BUMAY24 INNER JOIN PRODDTA.F4102BUMAY27 ON dbo.F4101BUMAY24.IMLITM = PRODDTA.F4102BUMAY27.IBLITMSean RoussyPlease backup all of your databases including master, msdb and model on a regular basis. I am tired of telling people they are screwed. The job you save may be your own. |
 |
|
|
misterzr
Starting Member
49 Posts |
Posted - 2005-06-16 : 18:19:54
|
| Thanks for the help this works great |
 |
|
|
|
|
|