Home » Developer & Programmer » Forms » how to make where clause (runtime)
how to make where clause (runtime) [message #263687] Thu, 30 August 2007 14:23 Go to next message
rajat_chaudhary
Messages: 141
Registered: November 2006
Location: india
Senior Member

hello gurus,

actually my question is directly related to forms.

question is :-

i have a form module in which there are 24 fields.
it is basically to fire a query on the basis of the fields which are filled and left which are blanked.

like as an example :-
i am form there are three columns (name,empno,address)
If user filled only name and empno with some values.
Now when i press for the result then the query should construct or build only for those fields which are not null ( i.e. filled with some values) and left the other fields.

considering the above example the query can be

select name,empno from table_name where name = value and empno = value;

but it is one query , there can be 3! = 6 possibilities for the above example. so it will contain 6 different procedures based on their values .

but if we think in case of 24 fields it is quite huge ....

so i want to make only one query at runtime based on the values which are filled only

thanks in advance

regards
rajat chaudhary
Re: how to make where clause (runtime) [message #263730 is a reply to message #263687] Thu, 30 August 2007 21:05 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Use the standard Oracle Forms functionality. Go into 'enter_query' mode, enter your data, and then do the 'execute_query'. Forms will build the query, execute it, and populate your fields for you.

David
Re: how to make where clause (runtime) [message #263744 is a reply to message #263730] Thu, 30 August 2007 23:02 Go to previous messageGo to next message
rajat_chaudhary
Messages: 141
Registered: November 2006
Location: india
Senior Member

ya martin,
you are absolutely right but user don't want to press any key ( e.g. F7 for enter_query and then F8 to execute_query) apart from the button which give the result.
Re: how to make where clause (runtime) [message #263758 is a reply to message #263744] Thu, 30 August 2007 23:55 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Then start the form in 'enter-query' mode and put the statement 'execute_query' in the 'when-button-pressed' trigger.

David
Previous Topic: disable record in data grid at oracle forms
Next Topic: build-in calender function available in developer6i ????
Goto Forum:
  


Current Time: Fri Dec 09 01:54:30 CST 2016

Total time taken to generate the page: 0.12752 seconds