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

In the middle of a transaction

Status
Not open for further replies.

alexs97

IS-IT--Management
Apr 27, 2003
5
0
0
US
If I'm in the middle of a large transaction but I want some SQL statements no to be in transaction...How can I do it???
 
If you want some SQL statements to execute only if certain conditions are met, then you will just need to put them in a CASE or IF statement. If you mean that you want to execute them outside of a transaction, that's not really possible, unless you first issue a COMMIT WORK or ROLLBACK WORK. Anything SQL wise that is placed between the BEGIN WORK and one of the former will become part of the transaction.

Transactions were designed to allow any changes made to a database to be un-done, if somewhere along the way an error is encountered in order to maintain database integrity. Preferrably, though, one will want to keep transactions as short as possible, even "wrapping" an SQL statement wherever viable.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top