views:

26

answers:

1

Hello all, this is my second time using ORACLE xe and Apex. Here is what I'm trying to do .. I'm trying to execute the following query SELECT * FROM EMPLOYEES WHERE JOB_TITLE = 'CLERK'

but not from sql command prompt but from gui/apex and here is how- I have created page one with one textfield and one submit button.

Now of course I'd type in the text field value CLERK and I'd like onclick on submit button that I be taken to page2 let say, and on that page2 to receive argument for the query. The query will be located at page2 of course.

I believe that this is fairly simple for someone who knows oracle, I know of course how I'd do this with PHP/Mysql its simple as it can be all I need is this :

#1 Get value from input
#2 Pass it to the next page using javascript or whatever
#3 Execute query on the next page using the value passed in where

Thank you, explanation tips hints link .. anything is welcome

+2  A: 

You can refer to any item in an Apex application from any other page. For example, on page 1 you have an item P1_JOB_TITLE, then on page 2 you write a query like:

SELECT * FROM EMPLOYEES WHERE JOB_TITLE = :P1_JOB_TITLE;

(warning: make sure that page 1 doesn't have a "reset" process which would clear the value of the item when the page is submitted)

Note, however, that the item doesn't have to be on a different page if you don't want it to - you could have it on the same page as the report.

Jeffrey Kemp
Thats it spon on m8. Thank you
c0mrade