Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
zakeer
Starting Member
20 Posts |
Posted - 2008-03-18 : 08:47:16
|
| i have a sp. it contains three insert statements. i want to commit only third insert statement. the rest has to be rolledback.how can i do this?Thanks & RegardsZakeer |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-03-18 : 08:48:44
|
| put the third insert alone in another transaction |
 |
|
|
elancaster
A very urgent SQL Yakette
1208 Posts |
Posted - 2008-03-18 : 08:50:56
|
| why do i get the feeling these are all your homework questions?...look at transactions in Books Online. once you've starte a transaction you can chose whether to commit or rollback. show us what you've tried and we will help you with the syntaxEm |
 |
|
|
LoztInSpace
Aged Yak Warrior
940 Posts |
Posted - 2008-03-18 : 21:15:36
|
| This is a pointless exercise. Why would you do an insert at all if you don't want to commit it? I think you've missed the point of transactions.Anyway, the answer to your question (if you really and truly want to do this) is to put appropriate DELETE statements to get rid of the first 2 rows before you commit. |
 |
|
|
|
|
|