Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Error -- what is wrong with this simple SQL query.

Richie VMay 13 2016 — edited May 17 2016

select sum(nvl(b.bill_amount, 0)) as Bill, sum(nvl(b.payment_amount, 0)) as Pay,

(SELECT count(c.bill_amount) from bills c where :P2_account_id = c.account_id) as Count

from bills b

where b.account_id = :P2_account_id

AND b.bill_date between (SYSDATE - 91)  and (SYSDATE - 61)

or

b.account_id = :P2_account_id

aND b.payment_date between (SYSDATE - 91)  and (SYSDATE - 61)

Can anyone tell me why I am getting this error? Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the ''generic columns'' checkbox below the region source to proceed without parsing

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 14 2016
Added on May 13 2016
13 comments
2,942 views