Am trying to execute this query but it doesn’t like it”it throws the following exception
“overflowed an int column. Maximum integer value exceeded.”
Not sure what am missing here
select * from Schedwin.SEVT where
ltrim(Resid)=345032 and type=5 or (type = 4 and subactid = 4)
or
(TYPE = 0)and (USER2='02-Force OT')
and ltrim(SEVT.t_start) <= 1215208800
and ltrim(sevt.t_start) <= 1215207800
order by SEVT.TYPE
My bad, t_start data type is char so i modified my query like below and it works
select * from Schedwin.SEVT where
ltrim(Resid)=345032 and type=5 or (type = 4 and subactid = 4)
or
(TYPE = 0)and (USER2='02-Force OT')
and ltrim(SEVT.t_start) <= '1215208800'
and ltrim(sevt.t_start) <= '1215207800'
order by SEVT.TYPE
size of an integer is 4 bytes. You are trying to store more than 4 bytes in a column, overflowing it. Use
bigintornvarcharas the type for that column. 🙂 Alter the table.