Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> SQL search for similar records with different dates
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
![]() |
![]() |