在应使用条件的上下文(在 'and' 附近)中指定了非布尔类型的表达式。
fcksj 2015-10-15 08:17:04 Microsoft OLE DB Provider for SQL Server 错误 '80040e14'
在应使用条件的上下文(在 'and' 附近)中指定了非布尔类型的表达式。
flagIndex = 0
nowstartdate=request("startdate")
if nowstartdate="" then
nowstartdate=date()-day(date()-1)
end if
nowenddate=request("enddate")
if nowenddate="" then
nowenddate=date()
end if
sql = "SELECT gys.id as id,gys.company as company,sum(buy.price2) as priceSum,count(gys.id) as nums FROM gys LEFT JOIN buy ON gys.ID = buy.id_gys where 1=1 and buy.zu and buy.isok and buy.price2<>0 "
if request.Cookies("shiwei_id")<>1 and lookbuysell="yes" then
sql=sql&" and buy.id_login="&request.Cookies("shiwei_id")
end if
if nowstartdate<>"" then
sql=sql&" and buy.datediff-(d,'"&nowstartdate&"',selldate)>=0"
end if
if nowenddate<>"" then
sql=sql&" and buy.datediff-(d,'"&nowenddate&"',selldate)<=0"
end if
sql=sql&" group by gys.id,gys.company order by sum(buy.price2) desc"
请问高人如何解决啊!