nijisha k c

nijisha k c

  • NA
  • 27
  • 2k

Arithematic overflow error converting expression to int

Aug 4 2015 5:39 AM
following is my query in sql 2005.But iam getting an error like arithmetic overflow error converting expression to data type int .
I think it is related to dateadd() function.Because when i put a sample date ,this query works well.
 
This is my query.
 
select tb_batch.batch_number, dateadd(s, tb_batch.exp_date,'1970-01-01')as exp_date,
tb_batch.purchase_rate, tb_batch.sale_rate from tb_batch

And This is the error

Msg 8115, Level 16, State 2, Line 1
Arithmetic overflow error converting expression to data type int.

Here datatype of exp_date is bigint

pls help me to solve this.

Answers (13)