B
bayceusr
Unregistered / Unconfirmed
GUEST, unregistred user!
在三层式中,在中间层的adoquery中执行以下这两个主语法:
SELECT cast(1 as bit) as chooseed, a.orderno, a.ordertype, a.operator, a.custID, a.tradeType, a.giveOrderDate, a.custorderno,
a.state, a.linkMan, a.linkPhone, a.linkFax, a.linkMail, a.inputor, a.inputdate, a.remark, b.shortname, b.custname,
c.Empname operatename, d .classname ordertypename, A.auditor, A.auditdate,
statename = CASE state WHEN 1 then
'未审核' WHEN 2 then
'已审核' WHEN 3
then
'已建生产单' WHEN 4 then
'已核销' END FROM sal_order a, bse_cust b, bse_employee c, bse_class d
WHERE a.custid = b.custid AND a.operator = c.empid AND a.ordertype = d .classid
AND (state=1 or state=2)
SELECT cast(1 as bit) as chooseed, a.orderno, a.ordertype, a.operator, a.custID, a.tradeType, a.giveOrderDate, a.custorderno,
a.state, a.linkMan, a.linkPhone, a.linkFax, a.linkMail, a.inputor, a.inputdate, a.remark, b.shortname, b.custname,
c.Empname operatename, d .classname ordertypename, f.classname tradetypename, A.auditor, A.auditdate,
( CASE state WHEN 1 then
'未审核' WHEN 2 then
'已审核' WHEN 3
then
'已建生产单' WHEN 4 then
'已核销' END ) as statename
FROM sal_order a
Inner Join bse_cust b on a.custid = b.custid
Inner Join bse_employee c on a.operator = c.empid
Left Join bse_class d on a.ordertype = d .classid
Left Join bse_class f on a.tradetype = f.classid
WHERE (state=1 or state=2)
第一句执行正常,第二句执行出现以下错误:
Unable to resolve records.Table Name not found,
跟踪语法,发现产生的语法有一句是 select orderNo from where order =
所以导致找不到空的表名,请问这是为什么,为什么两句语法差不多,为什么第二句执行出错呢?
SELECT cast(1 as bit) as chooseed, a.orderno, a.ordertype, a.operator, a.custID, a.tradeType, a.giveOrderDate, a.custorderno,
a.state, a.linkMan, a.linkPhone, a.linkFax, a.linkMail, a.inputor, a.inputdate, a.remark, b.shortname, b.custname,
c.Empname operatename, d .classname ordertypename, A.auditor, A.auditdate,
statename = CASE state WHEN 1 then
'未审核' WHEN 2 then
'已审核' WHEN 3
then
'已建生产单' WHEN 4 then
'已核销' END FROM sal_order a, bse_cust b, bse_employee c, bse_class d
WHERE a.custid = b.custid AND a.operator = c.empid AND a.ordertype = d .classid
AND (state=1 or state=2)
SELECT cast(1 as bit) as chooseed, a.orderno, a.ordertype, a.operator, a.custID, a.tradeType, a.giveOrderDate, a.custorderno,
a.state, a.linkMan, a.linkPhone, a.linkFax, a.linkMail, a.inputor, a.inputdate, a.remark, b.shortname, b.custname,
c.Empname operatename, d .classname ordertypename, f.classname tradetypename, A.auditor, A.auditdate,
( CASE state WHEN 1 then
'未审核' WHEN 2 then
'已审核' WHEN 3
then
'已建生产单' WHEN 4 then
'已核销' END ) as statename
FROM sal_order a
Inner Join bse_cust b on a.custid = b.custid
Inner Join bse_employee c on a.operator = c.empid
Left Join bse_class d on a.ordertype = d .classid
Left Join bse_class f on a.tradetype = f.classid
WHERE (state=1 or state=2)
第一句执行正常,第二句执行出现以下错误:
Unable to resolve records.Table Name not found,
跟踪语法,发现产生的语法有一句是 select orderNo from where order =
所以导致找不到空的表名,请问这是为什么,为什么两句语法差不多,为什么第二句执行出错呢?