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 |
|
skillile
Posting Yak Master
208 Posts |
Posted - 2002-12-03 : 17:31:59
|
| BEGIN TRANSACTION sSELECT 2IF 1 = 1 BEGIN ROLLBACK TRANSACTION sENDSELECT 1COMMIT TRANSACTION sIf I am correct I should never see the select statements, I don't think I should ever get to the SELECT 1. Anyway when I run this I get the error msg:Server: Msg 3902, Level 16, State 1, Line 12The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION.Any Ideasslow down to move faster... |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-12-03 : 17:34:05
|
| No, you'll see the SELECT statement, and the COMMIT. ROLLBACK does not terminate a batch, and since you don't have an ELSE clause, the procedure continues normally after the IF construct. |
 |
|
|
|
|
|