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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quick duplicate question

Status
Not open for further replies.

teknikalbody

Programmer
Mar 2, 2003
35
GB
Hi experts,

Just a quicky, I am doing...

Select field_1, field_2
from table_A a, table_B b
where a.identity = b.identity;

However, table_B has duplicates but I just want the one record from the table because they are exactly the same so the fist one it comes across will do.
Any suggestions ?

TIA

 
Thanks,

Tried that but unfortunately I can't use distinct because my field_2 is a blob.
 
I suppose that they belong to table_A:
Code:
Select field_1, field_2
from table_A a
where exists (select 1 from table_B b
where a.identity = b.identity);

Regards, Dima
 
sorry no, the duplicates are on table_B which also contains the image field i need to extract.
 
just as long ive got only got one record from each match I dont mind which one of the duplicates is extracted.

So I was thinking along the lines of max(b.rowid)...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top