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
 General SQL Server Forums
 New to SQL Server Programming
 Coding an Error Message

Author  Topic 

kohlhaas77
Starting Member

25 Posts

Posted - 2008-09-09 : 10:31:26
Hi Everyone,

I want to add an "error message" column to my output which will indicate a pre-defined data error to the recipient of the output.

I am thinking I need to use a CASE something like this...

CASE WHEN ((TABLE1.Column1 IN (0,1,2,6,975)) AND (TABLE1.Column2 = 0)) THEN ErrMsg["Invalid IPA/Con Arr Must Equal 0"] END

Help

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2008-09-09 : 10:34:55
Hi -- There's an article here on this site that should help you:

http://www.sqlteam.com/article/handling-errors-in-stored-procedures

- Jeff
http://weblogs.sqlteam.com/JeffS
Go to Top of Page
   

- Advertisement -