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 2005 Forums
 Transact-SQL (2005)
 Null Datetime Value Cause Exception

Author  Topic 

mindtrap
Starting Member

10 Posts

Posted - 2009-05-01 : 04:45:25
Hello,

I got a sql query like

SELECT userId FROM Assignment WHERE Assignment.endDate IS NULL OR Assignment.endDate < today

In this query when Assignment.endDate is null it throw an exception because null value can not be used such as Assignment.endDate < today, what can I do?

All help will be appreciated. Thank you in advance.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-05-01 : 05:11:20
Which exception do you get?



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page
   

- Advertisement -