Hi,
First of all, never ever use SQL code this way, this will open up a big hole for SQL Injections (
http://en.wikipedia.org/wiki/SQL_injection[
^]).
Anyway, I think you want to convert a SQL varchar to a SQL bigint because the SQL query returns that it cannot convert it from scratch, right?
So if you want to convert a varchar to a bigint in SQL, you could use the SQL function
convert()
(
http://msdn.microsoft.com/en-us/library/ms187928.aspx[
^]):
CONVERT(bigint, '123456789')
or as a single query executable by the SQL management studio:
SELECT CONVERT(bigint, '123456789')
I hope this helps.
Best regards and happy coding,
Stops