I converted a string value to int
CAST(TestSth3.Emp_Code AS int)
it returns 1,234 but i need 1234
i am using vb.net 2008.
Thanks
I converted a string value to int
CAST(TestSth3.Emp_Code AS int)
it returns 1,234 but i need 1234
i am using vb.net 2008.
Thanks
The following does return the data in the format you require in SQL Server
SELECT CAST('1234' AS INT) --Result 1234
If this is in .Net, perhaps you should look at the formatting options available to you there. Where possible you should always look to do any formatting in the presentation layer and not in the database.