carlavieira
Programmer
I have a procedure that will be executed by job or query analyzer. Within I have an insert:
insert tab1 (cp1,cp2)
values (@cp1,@cp2)
IF (@@error <> 0)
begin
goto grava_erro
end
.
.
.
grava_erro:
select @msg_erro = description from sysmessage where error = @@error
insert tab_erro (erro, dt, cp1, cp2)
values (@msg_erro, getdate(), @cp1,@cp2)
Is there another way to get the error message?
Thank you
Carla (carla.vieira@consist.com.br)
insert tab1 (cp1,cp2)
values (@cp1,@cp2)
IF (@@error <> 0)
begin
goto grava_erro
end
.
.
.
grava_erro:
select @msg_erro = description from sysmessage where error = @@error
insert tab_erro (erro, dt, cp1, cp2)
values (@msg_erro, getdate(), @cp1,@cp2)
Is there another way to get the error message?
Thank you
Carla (carla.vieira@consist.com.br)