Home » Developer & Programmer » Forms » From Date and to Date in Query Find Form in Custom Oracle Apps Form (Oracle Forms 10g)
From Date and to Date in Query Find Form in Custom Oracle Apps Form [message #603693] |
Wed, 18 December 2013 08:56  |
 |
megha2525
Messages: 62 Registered: June 2012 Location: columbus
|
Member |
|
|
Hi,
I am trying to develop a query find form based.
There are two data blocks - Master block and detail block for a particular invoice.
But I have to limit the data based on start_date and end_date that the user enters , and clicks find button.
Control_blk:
So I created another block called control block that has start_date , end_date and find button. Start date and end date are non database columns
On the find button , I put a when _button_pressed trigger.
go_block('INVOICE_BLK');
do_key('execute_query');
Invoice Block : ( master block )
created a master block that has the items invoice_id , first_name,last_name , account_type and agency_name.
Then created a pre-query trigger that has the code to populate data.
The query that populates the data is
select i.invoice_id,
i.first_name,
i.last_name,
cust.account_type,
a.agency_name
into :invoice_blk.invoice_id,
:invoice_blk.first_name,
:invoice_blk.last_name,
:invoice_blk.account_type,
:invoice_blk..agency_name
from invoice i , customer cust , agency a
where i.invoice_id = cust.invoice_id
and i.agency_id = a.agency_id
and cust.add_date between :control_blk.start_date and :control_blk.end_date;
But I get an error saying Unable to perform query.
Please let me know how can I fix this issue.
Thanks
Megha
|
|
|
|
|
Re: From Date and to Date in Query Find Form in Custom Oracle Apps Form [message #603696 is a reply to message #603695] |
Wed, 18 December 2013 09:27   |
 |
megha2525
Messages: 62 Registered: June 2012 Location: columbus
|
Member |
|
|
Hi Deepak ,
Thank you for the reply. But where should I write the below select query ?
select i.invoice_id,
i.first_name,
i.last_name,
cust.account_type,
a.agency_name
into :invoice_blk.invoice_id,
:invoice_blk.first_name,
:invoice_blk.last_name,
:invoice_blk.account_type,
:invoice_blk..agency_name
from invoice i , customer cust , agency a
where i.invoice_id = cust.invoice_id
and i.agency_id = a.agency_id
Thanks
Megha
|
|
|
|
|
|
|
Goto Forum:
Current Time: Wed Mar 12 06:27:30 CDT 2025
|