I'd like to do something like this
raiserror(concat('Error in case @isFishy =', @isFishy, ' @isSmarmy=', @isSmarmy, ' @isTasty = ', @isTasty), 10, 1)
--or
raiserror('Error in case @isFishy =' + @isFishy + ' @isSmarmy=' + @isSmarmy + ' @isTasty = ' + @isTasty, 10, 1)
But it just isn't working. How do I accomplish this? I'm in SQL S...
I'm very new to .NET. All I've done so far is implement some SQL Stored Procedure calls as WebServices by copying and pasting existing code (as instructed by my superior).
I am calling some commands via Database.ExecuteNonQuery(). In the SQL Stored Procedure, I am performing some security checks based on the LoginId passed in (a user ca...
Hi,
I have a system that connect to SQL Server through ODBC.
When I try to raiseerror from an IF...ELSE statement, it does not triggered the exception handling.
I have done some raise error testing at my side. Below is my finding:
RaiseError did not triggered exception:
CREATE PROC xxx
AS
IF 1=1
BEGIN
raiserr...
Hello!
I want that when I execute a query for example DELETE FROM Contact, and an error is raised during the transaction it should delete the rows that are able to be deleted raising all the relevant errors for the rows that cannot be deleted.
...
I need to exit a SQL script without an error if a certain condition holds true. I've read that 1 solution would be to raiseerror with error code 20+ and with log parameter. But the limitation for that is that i can execute that only as an admin and the connection to the db will be aborted.
Also, I tried using GOTO and jump to the end-o...