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 |
|
jeff06
Posting Yak Master
166 Posts |
Posted - 2009-05-08 : 10:09:54
|
| select count(*) from Casewhere ClosedDate>'/1/31/2009' Msg 241, Level 16, State 1, Line 1Conversion failed when converting datetime from character string.closedate is formated as datetime.How to solve this problem?Thanks.Jeff |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-05-08 : 10:16:10
|
specify in YYYYMMDD ISO formatselect count(*)from Casewhere ClosedDate>'20090131' KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-05-09 : 01:33:56
|
| You dont need laeding select count(*) from Casewhere ClosedDate>'1/31/2009'MadhivananFailing to plan is Planning to fail |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-05-09 : 01:35:57
|
| Also Case is a keyword and better not to use it for naming the objectsMadhivananFailing to plan is Planning to fail |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-05-09 : 04:38:56
|
| if you want to use it for objects remember to use them within escape characters as[Case] |
 |
|
|
|
|
|