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 |
|
Pinto
Aged Yak Warrior
590 Posts |
Posted - 2005-04-19 : 05:00:19
|
| I want to select all records with Area = 'South' and where Completed_time is null and Cancelled is null. However, I get an error on the Completed_time is null and Cancelled is null bit. Both these fields are datetime fields in sqlserver table. What syntax should I be using ?I am using the selection in Crystal reports - if that makes a difference....TIA |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-04-19 : 05:37:36
|
| Try thisSelect * from yourTable where Area = 'South' and Completed_time is null and Cancelled is nullMadhivananFailing to plan is Planning to fail |
 |
|
|
Pinto
Aged Yak Warrior
590 Posts |
Posted - 2005-04-19 : 09:44:34
|
| It should have been IsNull(Completed_time) |
 |
|
|
mwjdavidson
Aged Yak Warrior
735 Posts |
Posted - 2005-04-20 : 08:16:04
|
| Not in T-SQL - the ISNULL function requires two arguments.Mark |
 |
|
|
|
|
|