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.
Author |
Topic |
LiteProgrammer
Starting Member
2 Posts |
Posted - 2013-12-04 : 08:51:28
|
Hi,I am very new to sql programming. I have a database with 15 columns. At this moment I do this to get all rows containing the year 2013: WHERE DATEPART(yyyy, DownloadDate) = 2013 . But I also want to add a criteria so that I can have all rows where DownloadDate contains 2013 AND WHERE IsRead(BIT) contains NULL. I tried this: WHERE DATEPART(yyyy, DownloadDate) = 2013 AND IsRead = null . But this gave me nothing!Thx for helpNeedHelp |
|
MIK_2008
Master Smack Fu Yak Hacker
1054 Posts |
Posted - 2013-12-04 : 08:55:19
|
use "isRead IS NULL" instead of "= null"CheersMIK |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
LiteProgrammer
Starting Member
2 Posts |
Posted - 2013-12-05 : 08:22:22
|
Thanks for all your help. It worked like magic :) |
|
|
|
|
|