File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes call resultset in join query Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "call resultset in join query" Watch "call resultset in join query" New topic
Author

call resultset in join query

abu kamruzzaman
Greenhorn

Joined: Aug 03, 2004
Posts: 12
I have a SQL query: SELECT * FROM Job_Request_Record, Requester_Record WHERE Job_Request_Record.Job_Requester_ID=Requester_Reco rd.Requester_ID; if i want to call an attribute from Job_Request_Record table e.g. rs.getString("ID")is it valid? or anything else. please help.

Also, is it possible to have a create view table in ms access 2003?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56150
    
  13

abu please be sure to post your questions in the correct forum. This is clearly a JDBC question, so I am moving it to the JDBC forum.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Mala Sharma
Ranch Hand

Joined: Oct 29, 2004
Posts: 76
Hello abu,
If id is a column in only one of the table, then that call is legal. Maybe someone else can verify it as im a beginner as well.
nilesh Katakkar
Ranch Hand

Joined: Oct 27, 2004
Posts: 35
As long as you have ID column in the selected tables it should be ok. If two tables have same column name, (ID) in this case, I think, JDBC will give you back the first ID column value. However, if you are joining two tables, and both tables have same column name but join doesnt include it, then it would mean , there's a potential for these columns to have different values. You may get different answers than expected.

I have a SQL query: SELECT * FROM Job_Request_Record, Requester_Record WHERE Job_Request_Record.Job_Requester_ID=Requester_Reco rd.Requester_ID; if i want to call an attribute from Job_Request_Record table e.g. rs.getString("ID")is it valid? or anything else. please help.


nilesh<br />neilindallas@hotmail.com
 
I agree. Here's the link: http://jrebel.com/download
 
subject: call resultset in join query
 
Similar Threads
Can we use two quries using prepared statement in one method
Display query results in Table column format
Joining WebServices and SQL
How to get MSAccess SQL Query using Java
Executing HQL queries along with SQL Queries