Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> please help me in building a SQL query...........
I have two tables
typical data in the tables are like this
person2Address table
1 4 1 5 2 6 3 7 3 8
Address Table
4 abcd 01-09-82 5 xyz 01-10-95 6 pqrs 08-09-78 7 mnop 04-08-80 8 huil 04-08-80
I want each persons addresstext which is having the latest validity
start date.
if for a person two addresses have same validity start period then i
have to show any one of that.
ie the result should be
personuid addresstext
1 xyz 2 pqrs 3 mnop
i need to write a single query to achive this.
note: addressuid is actually not numeric, it is actually alphanumeric and not generated in sequential order. Received on Wed Jan 05 2005 - 01:53:06 CST