请高手看看我的查询语句错在了那里?在线等(50分)

  • 主题发起人 主题发起人 焰火使者
  • 开始时间 开始时间

焰火使者

Unregistered / Unconfirmed
GUEST, unregistred user!
请高手看看我的查询语句错在了那里?在线等

select sguestid,paybillid,(select sgoodsname from goods_d where goods_d.sgoodsid=jxc_pay_list_t.singoodsid) as goodname,sdoutprice,slnumber,sdoutprice,smoney
from jxc_pay_list_t where paybillid='20061212130439' and sguestid='超级管理员' and sinbillid between '20061212' and '20061212' order by paybillid desc
主要是看where 语句后面的
 
select sguestid,paybillid,(select sgoodsname from goods_d where goods_d.sgoodsid=jxc_pay_list_t.singoodsid) as goodname,sdoutprice,slnumber,sdoutprice,smoney
from jxc_pay_list_t where paybillid='20061212130439' and sguestid='超级管理员' and (sinbillid between '20061212' and '20061212') order by paybillid desc

这样试试的
 
还是不行啊!
 
晕,那里有这样写的 。
select a.sguestid,a.paybillid,b.sgoodsname as goodname,a.sdoutprice,a.slnumber,a.sdoutprice,a.smoney from jxc_pay_list_t a left join goods_d on a.sgoodsid=b.singoodsid where a.paybillid='20061212130439' and a.sguestid='超级管理员' and ) a.sinbillid between '20061212' and '20061212') order by a.paybillid desc
 
是不是查询结果没有数据??
 
是啊!就是查询结果没有数据
 
你 只写一个条件 where a.sinbillid between '20061212' and '20061212'
先看看有没有数据
我估计是日期处理的问题
 
好了
是日期的列名称写错了
我晕啊[:(]
结贴了
 
多人接受答案了。
 

Similar threads

后退
顶部