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 |
Steve2106
Posting Yak Master
183 Posts |
Posted - 2015-01-06 : 09:23:55
|
Hi There,I am trying to update a field based on a matching value from another table. I have tried the query below but I keep getting "The multi-part identifier "m.StatusID" could not be bound."Query:UPDATE tbMAddSET m.StatusID = as.StatusIDFROM tbMAdd mINNER JOIN tbAddStatus asON m.AutoId = as.AddIDThanks for your help.Best Regards,Always Learning. |
|
Ifor
Aged Yak Warrior
700 Posts |
Posted - 2015-01-06 : 09:29:24
|
[code]UPDATE mSET StatusID = as.StatusID...[/code] |
|
|
sz1
Aged Yak Warrior
555 Posts |
Posted - 2015-01-06 : 10:55:14
|
You cant use as as alias as its built in function: try thisUPDATE tbMAddSET [m.StatusID] = [a.StatusID]FROM tbMAdd mINNER JOIN tbAddStatus aON [m.AutoId] = [a.AddID]We are the creators of our own reality! |
|
|
|
|
|