关于SQL中IN的问题----在线等待

set rs=cnn.execute("select top 4 * from idb_products where productlink_productf in ('"&aa&"') order by productlink_order desc")

productlink_productf字段为数字型
aa变量为17,18,19,20,

错误提示:
[Microsoft][ODBC SQL Server Driver][SQL Server]将 varchar 值 '17,18,19,20,' 转换为数据类型为 int 的列时发生语法错误。

/default.asp,行131

问:整么写?
productlink_productf in ('"&aa&"')
---------------------------------------------------------------

productlink_productf in ("&aa&")试试?

Published At
Categories with Web编程
comments powered by Disqus