请告诉我查询有什么问题。我正在使用 Pro C。
EXEC SQL SELECT 1
INTO :db_count
FROM sachin t
WHERE t.serialno = :serial_no
AND t.amount = (:db_inamount - (SELECT NVL(overrun_amount,0)
FROM sunny tovrun
WHERE tovrun.serialno = :serial_no
AND tovrun.timestamp = t.timestamp
AND rownum < 2)
)
AND t.request_code = 11
AND t.reason_code = 0
AND t.reversed = 0
AND rownum < 2;
并得到编译错误
Syntax error at line 4487, column 42, file my_file.pc:
Error at line 4487, column 42 in file my_file.pc AND t.amount = (:db_inamount - (SELECT NVL(overrun_amount,0)