Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> SQL search for similar records with different dates

SQL search for similar records with different dates

From: <stanhelp_at_gmail.com>
Date: 13 Sep 2006 13:17:14 -0700
Message-ID: <1158178634.786232.35380@b28g2000cwb.googlegroups.com>


I've created a query that joins 3 tables that need to display only similar records that are in year 2005 and 2006.

Current 3 join Example Results Data:
Year Name Address


2005    ABC       95 Main St.
2005    AAA       12 Central St.
2006    AAA       12 Central St.
2005    BBB       3 Thank You Rd.
2006    BBB       3 Thank You Rd.

I don't want Name:ABC to be part of the data I get back. I get these results because I use ->Where Year BETWEEN '2005' AND '2006' in my 3 joins.

What I would like to see is:
Year Name Address


2005    AAA       12 Central St.
2006    AAA       12 Central St.
2005    BBB       3 Thank You Rd.
2006    BBB       3 Thank You Rd.

And even better would be:
Year    Name      Address

------------------------------------------------
2005-2006 AAA 12 Central St. 2005-2006 BBB 3 Thank You Rd.

Thank you for taking the time to help me. Stan
stanh..._at_gmail.com Received on Wed Sep 13 2006 - 15:17:14 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US