当我在 SQL 开发人员中运行该语句时,它运行良好,但是,当我尝试像这样通过连接管理器运行它时,我不断收到“找不到表或视图”。我想知道这是否是因为连接管理器可能有不同的语法规则或什么?有没有人知道问题可能是什么?谢谢。
ps = con.prepareStatement("select receipts.ordernumber, receipts.part, receipts.location, receipts.site,
receipts.orderqty, receipts.supplier, receipts.mfr, receipts.mfrpart,
receipts.ponumber, orders.poline, orders.porelease, orders.price,
orders.uom, orders.currency_r, orders.datecreated, orders.datelate,
orders.approval_time, orders.userid, orders.buyer, orders.note_r,
orders.qtyopen, orders.orderstate, supplier.accountnumber,
delivery.method,
CASE WHEN delivery.method = 'EDI' and delivery.process = 'ORDER' THEN 'YES' ELSE 'NO' END AS EDI,
receipts.userid " +
"from receipts, orders, supplier, delivery " +
"where receipts.customerix=43 and
orders.wip_order = 1 and supplier.suppliercode = orders.supplier and
supplier.customerix = orders.customerix and
delivery.supplierix = supplier.supplierix and
receipts.consigned = '1' and
orders.custordernumber(+) = receipts.ordernumber AND
orders.CUSTOMERIX(+) = receipts.CUSTOMERIX and
receipts.exported=0 and
receipts.export_active=1
order by receipts.ordernumber");
statement = update.prepareStatement(" update receipts set export_active = 1 where receiptix in " +
"(SELECT receipts.receiptix FROM pours.receipts, pours.orders, pours.supplier " +
"WHERE receipts.customerix =7021 AND orders.wip_order = 1 AND supplier.suppliercode = orders.supplier " +
"AND supplier.customerix = orders.customerix " +
"AND receipts.consigned = '1' AND orders.custordernumber(+) = receipts.ordernumber " +
"AND orders.CUSTOMERIX(+) = receipts.CUSTOMERIX AND receipts.exported = 0)");