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

Print output of updated records

Status
Not open for further replies.

Helio12

MIS
Sep 4, 2010
1
US
I have update statement which updates column name (auditor_details) in a churn of 50000 records at a time of auditor table which contain 4.2 millions records. I have schedule this through sqljob. I'm looking over sql example to
check for update records of auditor table and gives a output of updated records and quit the transaction if no update records for auditor_detail column.

Thanks in advance

 
Hi Helio12,

You may want to look at the OUTPUT clause in BOL or on the internet. Here is a an excerpt from BOL:

Returns information from, or expressions based on, each row affected by an INSERT, UPDATE, or DELETE statement. These results can be returned to the processing application for use in such things as confirmation messages, archiving, and other such application requirements. Alternatively, results can be inserted into a table or table variable.


Use it with your DELET, UPDATE or INSERT statements to save the updated records to a table or send them back an application.

Good luck.

MCITP SQL Server 2005, MCTS SQL Server 2008 (DBD, DBA)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top