-SQL 2000-
Is there any way to do this?
/*Begin*/
BEGIN TRAN
INSERT INTO DBXXX.dbo.Table (Name, LastName)
VALUES ('jjj','aaaa')
BEGIN TRAN LOG_ACTION
INSERT INTO DBXXX.dbo.ProcesLog (ProcId)
VALUES ('IniProc')
COMMIT LOG_ACTION
IF @@ERROR = 0 COMMIT
ELSE ROLLBACK
/*End*/
I need that, if @@ERROR <> 0 the transaction LOG_ACTION to be commited... and nor rolledback...
¿Is there any way to do this? Any command...
Thanks
Is there any way to do this?
/*Begin*/
BEGIN TRAN
INSERT INTO DBXXX.dbo.Table (Name, LastName)
VALUES ('jjj','aaaa')
BEGIN TRAN LOG_ACTION
INSERT INTO DBXXX.dbo.ProcesLog (ProcId)
VALUES ('IniProc')
COMMIT LOG_ACTION
IF @@ERROR = 0 COMMIT
ELSE ROLLBACK
/*End*/
I need that, if @@ERROR <> 0 the transaction LOG_ACTION to be commited... and nor rolledback...
¿Is there any way to do this? Any command...
Thanks