2
I am trying to check whether a certain value is already inserted in my table or not. Example : Check to be determined Imei already exists in the column Deviceimei.
I am trying to select Count, to return 0 if Imei is not inserted in the table. Example:
However this is not working, it is returning me the error : The conversion of the varchar value '352093084525269' caused l'overflow of a column int.
Note: The table is called Avl_ignition and the Deviceimei field is a varchar .
I wonder if using select Count is efficient ? I would also like to know what is the cause of this error ?
it seems that the error is in
where
, the Deviceimei field should be text, already triedwhere DeviceIMEI = '123'
?– Ricardo Pontual
@Ricardo Pontual had already tried, but with double quotes. I just tried with single quotes and it worked. Thanks for the time.
– Levi