Hi Everyone
I have a code here which for some reason branches to the GOTO statement, I think there is something wrong within the code itself, can someone help me re-write it properly, I want to have transactional handling and error control at thesame time.
Also, transactional handling tends to fail with an open transaction if the table isn't present, is this a normal behaviour ?
Create procedure SpTest
as
Begin
BEGIN TRAN
Select top 10 name into #temp from sysobjects
IF @@ERROR <> 0
GOTO ErrorControl
COMMIT
ErrorControl:
Print 'There was an error'
ROLLBACK
End