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!

passing user parameter into your sql query

644539Jun 11 2008 — edited Jun 11 2008
I've created two user parameters...'Order_date_from' and 'Order_date_to'

I've written a simple query to list the total order amount, order number, party name and ordered date
Select sum ((unit_selling_price)*(ordered_quantity)), count(line_number), oe_order_headers_all.order_number, hz_parties.party_name, oe_order_headers_all.ordered_date
from oe_order_lines_all,
oe_order_headers_all,
hz_parties,
hz_cust_accounts
where oe_order_lines_all.header_id=oe_order_headers_all.header_id
and oe_order_headers_all.sold_to_org_id = hz_cust_accounts.cust_account_id
and hz_cust_accounts.party_id = hz_parties.party_id
group by order_number, party_name, ordered_date;

I want to know how I can pass the value for the above mentioned parameters into my sql query so that it reflects as the 'ordered_date' in the report and only shows the data for the dates that the user inputs.
Any feedback would be appreciated. Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 9 2008
Added on Jun 11 2008
6 comments
749 views