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 |
|
MBeal
Posting Yak Master
110 Posts |
Posted - 2005-10-20 : 12:18:08
|
| This seems so simple however for some reason I cant see the forest for the trees...Update RoomsSet RmBlkOrder = N.RmBlkOrderfrom Rooms R Inner join Rooms N on Left(R.RoomNo,4) = N.RoomNoWhere R.RmBlkOrder = 0 and len(R.RoomNo) = 5Running this query returns the following message:Server: Msg 8154, Level 16, State 1, Line 1The table 'Rooms' is ambiguous.I have tried to add and remove alias' but I can't seem to get it to work. I'm sure it is an easy thing...MBeal |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2005-10-20 : 12:53:44
|
You're mixing using table aliases and not using them. try this:update r set r.RmBlkOrder = n.RmBldOrderfrom rooms rjoin rooms n on ...where... Be One with the OptimizerTG |
 |
|
|
MBeal
Posting Yak Master
110 Posts |
Posted - 2005-10-20 : 15:32:51
|
| Thank you very much, you guys are great!MBeal |
 |
|
|
|
|
|