Works fine with isql but powerbuilder datawindow gives error
Posted on 1999-12-04
This script works fine when i run it with isql and gives me result
but when i run this script on powerbuilder database painter or datawindow it give error
"Incorrect syntax near '2'.
The select is
cc_paid = ( SELECT sum(payment_amount)
FROM Invoice, Payments
WHERE ( Invoice.vendor_no = Payments.vendor_no ) and
( Invoice.invoice_number = Payments.invoice_number ) and
( Invoice.order_number = Payments.order_number )
GROUP BY Invoice.order_number, Payments.fund_key
HAVING ( Invoice.order_number = Encumbered_Funds.order_number ) and
( Payments.fund_key = a.fund_key))
FROM Encumbered_Funds a
WHERE a.order_number = "111"
ORDER BY Encumbered_Funds.fund_key ASC
The whole select statement is repeated in the eroor message.
Please do help me.I have see this problem when i use a nested query in my slect statment.I cannot change the select statement for the datawindow.Only powerbuilder gives the problem