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 |
|
DMarmolejos
Yak Posting Veteran
65 Posts |
Posted - 2008-07-07 : 13:55:12
|
| SELECT T0.[CardCode], T0.[CardName] FROM [dbo].[ORDR] T0 WHERE T0.[DocStatus] = 'O' AND T0.[CreateDate] >=[%1]ERROR - arithmetic overflow error converting expression to data type datetimeThis code allows the user to input the date, but I am getting this error. Do I have to convert the date or compare it a different way?Any help is appreciated, thank you. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-07-07 : 13:56:50
|
| It says it couldnt convert the value given for date parameter to be a valid date. what was the value you passed? |
 |
|
|
DMarmolejos
Yak Posting Veteran
65 Posts |
Posted - 2008-07-07 : 14:40:21
|
quote: Originally posted by visakh16 It says it couldnt convert the value given for date parameter to be a valid date. what was the value you passed?
Thanks, but I found out.For anyone who has the same issue, you got to have single quotes around the input variable T0.[CreateDate] >='[%1]' |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2008-07-07 : 15:13:09
|
| That looks like Access, not SQL Server.CODO ERGO SUM |
 |
|
|
DMarmolejos
Yak Posting Veteran
65 Posts |
Posted - 2008-07-07 : 15:26:51
|
| its SQL Server 2005 w/ SAP |
 |
|
|
|
|
|