Wednesday, March 28, 2012

how to form query?

i am using this statement
select dateadd(dd,1,20010331)
and it's throwing an error
Arithmetic overflow error converting expression to data type datetime.
what's wrong?sql server wants to have date strings, not integers

select dateadd(dd,1,'2001-03-31')|||i am using this statement

select dateadd(dd,1,20010331)


and it's throwing an error

Arithmetic overflow error converting expression to data type datetime.

what's wrong?You're missing quotes:

select dateadd(dd,1,'20010331')

No comments:

Post a Comment