I'm running into a problem with a stored procedure handling messages.
First, create a table with one integer column.
Create table test (a int)
Next, create a unique index on that column using Enterprise Manager. Make
sure to check the checkbox "Ignore duplicate values".
Now insert 10 rows into the table with "a" being 1..10.
Create a stored procedure which will insert 5 into this table.
Call this stored procedure from Query Analyzer. You should receive message #
3604, Duplicate Key Ignored.
Now, create an SQL Server job which calls this stored procedure. Run this
job. The job's status will be "failed" because message #3604 is returned.
Yet, this is not really a failure.
Is there any way to get around this problem?