Skip to Main Content

DevOps, CI/CD and Automation

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!

Encountered the Symbol 'Select' when expecting one of the following

martinleyApr 29 2008 — edited Apr 30 2008
Hi,

I have created a PL/SQL Program Unit in Oracle Reports to return the Deduction elements to be displayed on a report. This program Unit uses the below cursor,

CURSOR deduction_cur IS
SELECT DISTINCT dp1.employee_number, print_sequence, dp1.time_period_id,
dp1.element_name,
(SELECT SUM (dp2.pay_value)
FROM dp_payslip_elements dp2
WHERE dp1.element_name = dp2.element_name
AND dp1.employee_number = dp2.employee_number
AND dp1.time_period_id = dp2.time_period_id) AS pay_value
FROM dp_payslip_elements dp1
WHERE element_classification = 'D'
AND employee_number = :employee_number
AND time_period_id = :time_period_id
AND pay_value <> 0
ORDER BY employee_number, print_sequence, element_name;


The query works correctly in TOAD, but when I try and compile this with Oracle Reports I get this error message:

Encountered the Symbol 'Select' when expecting one of the following:

and then lists lots of key words.

Is there a way in Oracle reports to get round this issue, because I need this Sum value for each element?

Many Thanks

Martin
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 28 2008
Added on Apr 29 2008
5 comments
3,266 views