Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

problem with UNION query

843859Nov 24 2006 — edited Nov 24 2006
Hi frnds....

i would like to know if java supports a result set containng a query of type UNION i.e. a query containng a UNION of two SELECT statements

i am askng this becoz, i want to create a JTable using such a query.
The code which i have written to create a TableModel from the ResultSet has been created and is working very fine......for normal queries....but it does not wrok for the union query...

infact i tried to get get the output directly from the result set.....but it returns only the data that is returned from the 1st select statement in the UNION query. and the data return after the UNION keyword in the query is not displayed.....

I am using the MS Access as my database..and the same UNION query is running fine in the MS access query generator

plz help me out.....if any one has come across such a situation and that has found any solution

Message was edited by:
vaibhavpingle
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 22 2006
Added on Nov 24 2006
4 comments
195 views