Monday, March 12, 2012

problem when trying to query on datetime field

Hello All ,
my name is ron ,
i have the following problem:
when i running the query on my Sql server Database:
SELECT AVG(VOLUME) AS AvgVolume
FROM STOCKS_VOLUME
WHERE (SYMBOL = 'AUDC') AND (QUOTE_DATE >= '23/12/2003')
i get an error:
The conversion of char data type to a dattime data type resulted in an
out-of-ranged datetime value .
what is wrong with my query does anyone have any idea how to solve this ?
thanksUse a safe and language neutral datetime format for your datetime literal. I
prefer the unseparated format:
'yyyymmdd'
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Roni Bar Yosef" <ronby@.malamall.co.il> wrote in message
news:402a4c5f@.news.bezeqint.net...
> Hello All ,
> my name is ron ,
> i have the following problem:
> when i running the query on my Sql server Database:
> SELECT AVG(VOLUME) AS AvgVolume
> FROM STOCKS_VOLUME
> WHERE (SYMBOL = 'AUDC') AND (QUOTE_DATE >= '23/12/2003')
> i get an error:
> The conversion of char data type to a dattime data type resulted in an
> out-of-ranged datetime value .
> what is wrong with my query does anyone have any idea how to solve this ?
> thanks
>

No comments:

Post a Comment