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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Help 1

Status
Not open for further replies.

dndaughtery

Programmer
Jan 25, 2006
67
US
I need to update a field in a table called "RejectCollections" with a value from a temp table with the name "TigerTemp" based on matching fields called "rejectid". Below is what I have, will this work correctly?


Update RejectCollections Set RejectCollections.COLL_TOTAL = TigerTemp.COLL_Total
Where RejectCollections.RejectID = TigerTemp.RejectID
 
it should be something like this:

Update RejectCollections
Set COLL_TOTAL = T2.COLL_Total
FROM RejectCollections T1
INNER JOIN TigerTemp T2
ON T1.RejectID = T2.RejectID

-DNG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top