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 |
|
Rauken
Posting Yak Master
108 Posts |
Posted - 2005-04-08 : 08:23:32
|
| My client has a database with a table, [order] with a field of datetime type, delivery_date. If it's not entered it's set to "1900-01-01 00:00:00" by default, Null is not allowed.I need help with a simple select statement. I want all the fields from [order] select * from [order] but I want blank values for delivery_date if it contains the 1900.. value. |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-04-08 : 08:30:54
|
select nullif(delivery_date, '1900-01-01 00:00:00')from orderGo with the flow & have fun! Else fight the flow |
 |
|
|
Rauken
Posting Yak Master
108 Posts |
Posted - 2005-04-08 : 09:04:51
|
| Thanks, saved my day! Now it's time for Friday afternoon beer. |
 |
|
|
|
|
|