File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Oracle/OAS and the fly likes how to get child table values from parent query Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Reply Bookmark "how to get child table values from parent query" Watch "how to get child table values from parent query" New topic
Author

how to get child table values from parent query

Reshma Reddy
Ranch Hand

Joined: Dec 21, 2006
Posts: 190
Hi All,

I want to get second(reference) table status using id in first query.

I am calling select * from table1;
this table1 contains one column called referenceid. This reference id details will be there in table2 (id,status,date....etc). At time the of calling select * from table1 I want to get reference id status instedof referenceid.

Please provide any query.
Agador Paloi
Ranch Hand

Joined: Jan 24, 2006
Posts: 114
Sounds like you want to join table1 with table2 to get a status from table2.
Query would be
SELECT
t2.id ,
t2.status
FROM
table1 t1,
table2 t2
WHERE
t1.id = t2.id


Agad
 
 
subject: how to get child table values from parent query
 
Threads others viewed
how to get child table values from parent query
two table mapping.
Update with subquery
how to improve performance
Hibernate: Different Join in Save() and Get()
developer file tools