passing user parameter into your sql query
644539Jun 11 2008 — edited Jun 11 2008I'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.