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 |
putane.sanjay
Yak Posting Veteran
77 Posts |
Posted - 2006-11-09 : 06:43:07
|
Hi IN THE TABLE I HAVE A DATE COLUMN IN THE FORMAT'0000-00-00 00:00:00'I HAVE TO GET THE WHEN I PUT ONLY A DATEPARTEX: @A='2006-10-05'I TRIEDselect vfilename, deliverydate from JobsAvailable where deliverydate='2006-10-05' but i got the errorPlease give me a syntax |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-11-09 : 07:35:32
|
what is the data type for the date column ? KH |
 |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-11-09 : 07:42:34
|
Try ISO format yyyymmddselect vfilename, deliverydate from JobsAvailable where deliverydate='20061005' Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-11-09 : 07:53:22
|
quote: I TRIEDselect vfilename, deliverydate from JobsAvailable where deliverydate='2006-10-05'but i got the errorPlease give me a syntax
What is the error message ? KH |
 |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-11-09 : 07:56:34
|
quote: What is the error message ?
My guess:The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-11-09 : 08:01:14
|
Maybe not really error but the query does not work.Try thisselect vfilename, deliverydate from JobsAvailable where deliverydate >= '2006-10-05'and deliverydate < '2006-10-06' KH |
 |
|
|
|
|