Home » Developer & Programmer » Forms » Varying Where clause at runtime --- Urgent Plz.
Varying Where clause at runtime --- Urgent Plz. [message #153346] Sat, 31 December 2005 21:07 Go to next message
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 messageGo to next message
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 messageGo to next message
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 messageGo to next message
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....
Re: Varying Where clause at runtime --- Urgent Plz. [message #153368 is a reply to message #153349] Sun, 01 January 2006 12:23 Go to previous messageGo to next message
feroze
Messages: 144
Registered: September 2005
Location: chicago
Senior Member
Hi

Sorry man i can't test here i don't have forms installed, this was all assumption as what i understood the question,


Best of luck

[Updated on: Sun, 01 January 2006 23:34]

Report message to a moderator

Re: Varying Where clause at runtime --- Urgent Plz. [message #153446 is a reply to message #153346] Mon, 02 January 2006 08:06 Go to previous messageGo to next message
srinivasocp
Messages: 91
Registered: December 2005
Location: INDIA
Member
Hi Everyone,


Plz help me regarding this. I need code for my requirement as

mentioned in my first post.









Regards
srini
Re: Varying Where clause at runtime --- Urgent Plz. [message #153507 is a reply to message #153446] Mon, 02 January 2006 22:55 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Search this forum for 'default_where'. You can also search this forum for 'FROM clause query'.

David
Previous Topic: how i can enable the unicode support in form. it very urgent
Next Topic: Hi I'm new to Oracle family
Goto Forum:
  


Current Time: Fri Sep 20 05:39:57 CDT 2024