Varying Where clause at runtime --- Urgent Plz. [message #153346] |
Sat, 31 December 2005 21:07 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
srinivasocp
Messages: 91 Registered: December 2005 Location: INDIA
|
Member |
|
|
Dear All,
FIRST I "Wish U ALL A HAPPY NEW YEAR"
I am using Forms 6i. I have a DB table Emp where I have the following fields.
EMPNO ENAME JOB HIREDATE sal deptno
7711 SCOTT MANAGER 11-12-1980 3000 20
7722 KING PRESIDENT 03-03-1979 5000 10
7733 MILLER CLERK 13-10-1980 2000 20
7744 JOHN ANALYST 04-09-1980 2500 20
7755 JANE MANAGER 15-07-1979 3000 20
7766 DAVID CLERK 12-05-1980 2000 10
7777 RICHARD ANALYST 03-11-1979 3000 10
Now my requirement is I have to provide the End user with two pop list Items, which displays the employee
details from one particular date to other. say my user selects in one pop list item 03-03-1979(this is from date)
and 13-10-1980(to date) then the form has to build this query at runtime and display the employees
from that date to the end date. How could I do this?
1)How will my Pop list be populated with the dates?
2)where and What code should I have to write to make this variable where clause work? Please explain me in
detail.
Any Help will be greatly appreciated.
Thnx and Regards..
Srini....
|
|
|
Re: Varying Where clause at runtime --- Urgent Plz. [message #153347 is a reply to message #153346] |
Sat, 31 December 2005 21:18 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
srinivasocp
Messages: 91 Registered: December 2005 Location: INDIA
|
Member |
|
|
Dear All,
FIRST I "Wish U ALL A HAPPY NEW YEAR"
I am using Forms 6i. I have a DB table Emp where I have the following fields.
EMPNO ENAME JOB HIREDATE sal deptno
7711 SCOTT MANAGER 11-12-1980 3000 20
7722 KING PRESIDENT 03-03-1979 5000 10
7733 MILLER CLERK 13-10-1980 2000 20
7744 JOHN ANALYST 04-09-1980 2500 20
7755 JANE MANAGER 15-07-1979 3000 20
7766 DAVID CLERK 12-05-1980 2000 10
7777 RICHARD ANALYST 03-11-1979 3000 10
Now my requirement is I have to provide the End user with two pop list Items, which displays the employee
details from one particular date to other. say my user selects in one pop list item 03-03-1979(this is from date)
and 13-10-1980(to date) then the form has to build this query at runtime and display the employees
from that date to the end date. How could I do this?
1)How will my Pop list be populated with the dates?
2)where and What code should I have to write to make this variable where clause work? Please explain me in
detail.
Any Help will be greatly appreciated.
Thnx and Regards..
Srini....
|
|
|
Re: Varying Where clause at runtime --- Urgent Plz. [message #153348 is a reply to message #153347] |
Sat, 31 December 2005 21:47 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
feroze
Messages: 144 Registered: September 2005 Location: chicago
|
Senior Member |
|
|
Hi
HAPPY NEW YEAR TO ALL THE MEMBERS OF THIS FORUM..
Well you can write a when_list_changed trigger on your list item and pass the value of this list item to your where clause.
You can write your dynamic where clause in 2 ways either if u have any code for execute query on any push BUTTON there,
before the built in EXECUTE_QUERY set your where clause as
set_block_property('BLOCK_NAME', default_where,'ur condition')
or else second option is to set in block properties default where property :Block_name.list_item_value.
Hope it should work, Let us know.
Regards
|
|
|
Re: Varying Where clause at runtime --- Urgent Plz. [message #153349 is a reply to message #153346] |
Sat, 31 December 2005 22:10 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
srinivasocp
Messages: 91 Registered: December 2005 Location: INDIA
|
Member |
|
|
Hi Feroze
Happy New Year and Thanks for ur immediate response.
The issue is not to set the default_where clause .. how can
i build a dynamic select statement with both the from hiredate
and to Hiredte. If u don't mind can u explain me with an
example or u can take my scenario.
Please.................
Regards
srini....
|
|
|
|
|
|