Thursday, 15 May 2014

Classic asp convert varchar to int in SQL query using SQL Server 2014 -


I am updating a legacy site which uses Classic ASP and used to use SQL Server 2003 is done. The sortorder column is stored as a varchar .

The following varchar column is used to convert to a int , which can then be sorted into output (1-20 Numerical). Recalls returned from "1" to "10" and then "11" etc. It is still treating them as varchar .

Do I need to do something new for SQL Server 2014 in the classic ASP file? I have tried artists, and paras.

  rq = "select *, convert from table (int, sorter) where sort = 1 order by order =" set rs = connect. Exsecut (rk)  

Thank you for any assistance you can provide. I have tested the answers here, but nothing can be found for the new SQL Server database with Classic ASP.

You enter your ORDER BY in INT Needs to be converted so that it can be sorted properly:

  rq = "select * from the table where the = 1 command is determined by convert (int, sortorder)" rs = Connect. Execute (RQ)  

Simply SELECT does not help ...


No comments:

Post a Comment