Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sub Query/Union? 1

Status
Not open for further replies.

nickotine

Programmer
Nov 27, 2001
23
GB
I am using 'Oracle version 7', I am querying against 2 Tables, the join between the tables return more than one matching row from the second table, the records in the second table contain a date/stamp, I only want to select the row with the latest date/stamp.

Please can you Help.
 
select t1.col1, t2.col2, max(t2.date_stamp)
FROM my_table t1, your_table t2
WHERE t1.col3 = t2.col3
GROUP BY t1.col1, t2.col2;
 
Absolutly Brilliant, Thanks for the reply it worked!! and am I happy.

Cheers,

Nickotine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top