Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update with checking for column name 1

Status
Not open for further replies.

UnsolvedCoding

Technical User
Jul 20, 2011
424
US
I am working on a project where a update statement is used in a stored procedure. The statement itself isn't that difficult its simply updating a sheet with an inner join to get the correct informtion.

However, I keep getting an error saying that the column I want to update already exists which it does.

Code -

Update Month_end_master
set Shipping_NBR = T.Invoice_Nbr
from Shipping C
inner join Test_DB.dbo.Tracking T
on C.Shipping_NBR =(right ('0000' + T.Lading_nbr, 4))
And C.Shipping_NBR = T.Invoice_Nbr
where c.[Rollback] = 0
and c.Invoice_NBR is null


What am I missing?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top