Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 SET ANSI_WARNINGS OFF

Author  Topic 

simondeutsch
Aged Yak Warrior

547 Posts

Posted - 2003-07-30 : 12:51:54
I wrote a stored procedure that eliminates duplicates using the IGNORE_DUP_KEY option for the CREATE INDEX. When running the stored procedure, you get the message "Duplicate Key Was Ignored" if there was duplicate data. I would like to eliminate this message b/c it looks like an error. I have tried using SET ANSI_WARNINGS OFF, but it didn't affect it. Any other way to suppress this message?

Sarah Berger MCSD

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-07-30 : 13:29:47
Can't you just ignore the message in your application? It would be like ignoring the row count that comes back when you don't turn NOCOUNT on in a stored procedure.

Tara
Go to Top of Page

simondeutsch
Aged Yak Warrior

547 Posts

Posted - 2003-07-30 : 14:10:47
I guess I could...
The stored procedure actually doesn't return messages to a front-end client. It's part of a long data-scrubbing script batch that runs in QA. I was trying to eliminate all "red messages" from the results to make it look more professional. (looks better when no errors have occurred...)

Sarah Berger MCSD
Go to Top of Page
   

- Advertisement -