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

Home -> Community -> Usenet -> c.d.o.misc -> Find Duplicate Values with Varying Start Dates

Find Duplicate Values with Varying Start Dates

From: is_db <is_db_at_hotmail.com>
Date: 26 Feb 2006 22:18:27 -0800
Message-ID: <1141021106.995091.282030@i39g2000cwa.googlegroups.com>


I am trying to find all duplicate values in a 7-day date range so that if an item/customer combination exists more than once either 3-days before or after the date being evaluated it will be returned as having a duplicate. All days in the table need to be evaluated in a loop fashion so that each item is compared to all duplicate item/customer combinations in the 3-day period before or after the sale date.

For example, with:

Column 1: Date
Column 2: Item
Column 3: Customer

And values:

1/1/06
Item A
Customer A

1/2/06
Item A
Customer A

1/3/06
Item B
Customer A

1/4/06
Item A
Customer A

When 1/2/06 is evaluated it would evaluate Item A/Customer A as a duplicate because an equivalent item was found on 1/1/06 and on 1/4/06.  In this example, 1/1/06, 1/2/06, and 1/4/06 would all be returned as duplicates. Received on Mon Feb 27 2006 - 00:18:27 CST

Original text of this message

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