ProC 中的编译时错误(C 中的嵌入式 sql)
请告诉我查询有什么问题。我正在使用 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)
Please tell me whats wrong with the query. I am using 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;
And getting the compilation errors
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)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
用途:
它是一个标准计算列,在与
t.amount
值进行比较之前计算该值是否相等。Use:
It's a standard computed column, where the value is calculated prior to the comparison to the
t.amount
value for equality.