I have a column RES_LOCALIZADOR which is a numeric string.. it should be a bigint though.
When executing this query, although it doesnt fail, it doesnt return any value when it should. I have added CAST fucntion to prevent an error I had before (The conversion of the varchar value overflowed an int column in sql server)
var str = new StringBuilder();
str.AppendLine(" SELECT WEB_codigo ");
str.AppendLine(" FROM[intranetMinorista].[dbo].[RESERVA] R WITH(NOLOCK) ");
long value = 206627660;
str.AppendFormat(" WHERE CAST(RES_LOCALIZADOR AS BIGINT)=" +value);
Any help?
Thanks