How to use in select statement with where condition comparing a Null value and with value?
I have this Statement
Select Col1, Col2, Col3 From Table where DateDeleted 'Here comes the problem
The condition is something like if DateDeleted (which is actually a date) is Null then get records with null DateDeleted, else it should compare the DateDeleted to specified date. If this DateDeleted is less than (or earlier) than the specified date then it will show the records, else it bypass it.
The idea of the select statement is to get all data with null DateDeleted and those having DateDeleted but less than (or earlier) than a given specific date
I am using vb.net 2010 and Sql server 2008 r2.
Hope somebody can help me for im running of time trying to figure this out
thank you in advance