Querying Oracle 10G XE using Sun Java Creator 2 - Adding data to the page
(Page 4 of 5 )
You can drag and drop the data objects, such as a table, to the page. For example if you drag and drop the Employees table to the page you will be creating SessionBean1 as shown. You are effectively adding rows of data from the query "Select * from HR.EMPLOYEES".

Editing the query in the query editor
Now double click the employeesRowset icon under SessionBean1. This opens up the query editor as shown in the next picture. The query can be "run" to review the rows returned. This will populate a pane below the SQL view where you can review the results. If you right click on an empty area, you can pop open the context sensitive menu from which you can run the query as well as add more tables, or add grouping information to your query.

The result of running the query together with the SQL statement is shown in the next picture. You may modify the query until you are satisfied with the results of the query. As you can see the query was modified to drop a number of columns by deselecting them; a criterion is added, the results sorted by LastName, and the column aliases added.

Next: Displaying the Query results >>
More Java Articles
More By Jayaram Krishnaswamy