BoggyBayouBoy
asked on
Updating one table with values from another
I have the following sql statement and I get a "cannot be bound" error.
update Products
set a.sizeenglish= b.sizeenglish
from Products a , Conversions b
where b.sizedecimal= a.sizedecimal
the conversion table looks like this
1", 2.54
2 3/4", 5.625
the decimal sizes in my products table are already populated.
update Products
set a.sizeenglish= b.sizeenglish
from Products a , Conversions b
where b.sizedecimal= a.sizedecimal
the conversion table looks like this
1", 2.54
2 3/4", 5.625
the decimal sizes in my products table are already populated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Great!! thanks.
self-documenting, if you later have to go back and add a LEFT/RIGHT/FULL JOINs
to a third table, it will allow you not to get the mixed-join-types error, but both forms COMMAS and JOINS deliver the same result.
Your error "cannot be bound" is due to the alias your are updating Products and then in your from you have Products as a.. and yo do not need to use the alias in the set ...see set a.sizeenglish...see code :)
Open in new window