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 |
pareshmotiwala
Constraint Violating Yak Guru
323 Posts |
Posted - 2011-11-09 : 14:46:42
|
folks I have a column which is Numeric 18, which is basically a date typeI run the following query against itselect dateadd(dd,floor(dates.Column0/1000000/86400),'01/01/1960 00:00:00')from dbo.datesI get this errorArithmetic overflow error converting expression to data type int.RegardsParesh MotiwalaBoston, USA |
|
pareshmotiwala
Constraint Violating Yak Guru
323 Posts |
Posted - 2011-11-09 : 15:17:12
|
The Values typically are 1620556868093680, 1636182788871210 and so onAbout 2 million records.RegardsParesh MotiwalaBoston, USA |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-11-10 : 00:40:27
|
sorry your expression doesnt make sense. you're trying to add days ? what does column0 contain?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
pareshmotiwala
Constraint Violating Yak Guru
323 Posts |
Posted - 2011-11-10 : 09:09:22
|
it was a date of some format, but I figured out the issue.The number in the Dateadd field has to be INT, this one is "Numeric"; that was one gotcha.The second gotcha was there was a '-' in one of the numbers....Thanks for your response.RegardsParesh MotiwalaBoston, USA |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-11-10 : 09:58:15
|
np ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|