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)
 Hiding warning message

Author  Topic 

skchaman
Starting Member

6 Posts

Posted - 2004-11-20 : 04:38:32
Is it possible to hide the messages like
Warning: Null Value eliminated from Aggregate

If yes, please tell me how.

Thanks

Kristen
Test

22859 Posts

Posted - 2004-11-20 : 07:02:13
Ther eis an ansi warning flag which will let you do this. However, I think you'd be better to fix the problem otherwise other warnings might crop up which get ignored.

For example

SELECT SUM(MyColumn)
FROM MyTable
WHERE MyColumn IS NOT NULL

or

SELECT SUM(CASE WHEN MyColumn IS NOT NULL THEN MyColumn ELSE 0 END)
FROM MyTable

Kristen
Go to Top of Page
   

- Advertisement -