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 |
|
getur.srikanth@gmail.com
Yak Posting Veteran
77 Posts |
Posted - 2008-01-18 : 12:00:48
|
| my parameters @FromDate and @ToDate.I have to check Null dates and taffDate Between @FromDate and @Todate in Select statement.WHERE (@FromDate is null or @ToDate is Null or taffDate BETWEEN @FromDate and @ToDate).Is this way right? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-01-18 : 12:05:30
|
| nope. use like thisWHERE (@FromDate is null OR taffDate>=@FromDate)AND (@ToDate is Null OR taffDate <=@ToDate) |
 |
|
|
getur.srikanth@gmail.com
Yak Posting Veteran
77 Posts |
Posted - 2008-01-18 : 12:16:29
|
| thanks |
 |
|
|
|
|
|