asp SPLIT 方法问题 求助

来源:百度知道 编辑:UC知道 时间:2024/06/04 13:40:37
我有个 product 表 表中的“价格”属性字段类型是文本 具体表现为

120/140/160 即 底价/公布价/市场价,我如何查询低价大于300的产品呢? split 用/分割 只要比较返回数组下标为0的 数组大于300即可,

如何传递这个数组的值对应于 product表的中 “价格 ” 并能用SQL 查询低价大于300的产品呢?
数据库当初没设计好,先在查询起来不是很方便,当时价格分开定义就好了
查询价格 为零 是这样对比的

sql="select * from product where (价格='0/0/0' ) order by ID DESC"

可以这样来计算
select * from product where (价格 like '___/%' and convert(int, left(价格,3)) > 300 and left(价格,3) = replace(left(价格,3),'/','')) or left(价格, 4) = replace(left(价格,4),'/','')

Microsoft VBScript 编译器错误 错误 '800a03f6'

缺少 'End'

/iisHelp/common/500-100.asp,行242

Microsoft VBScript 编译器错误 错误 '800a0409'

未结束的字符串常量

/jkp/product_index.asp,行176

sql = " select * from product where (价格 like '_/%' and convert(int, left(价格,3)) > 300 and left(价格,3) = replace(left(价格,3),'/','')) or left(价格, 4) = replace(left(价格,4),'/','')