Advertisement

05.13.2008 at 06:44AM PDT, ID: 23397704
[x]
Attachment Details

SQL Query to get duplicate records where each record has a valid date range (Start/end)

Asked by tozysentosa in Databases Miscellaneous, MS SQL Server, SQL Query Syntax

Tags: Microsoft, SQL Server DTS, 2000

Hi!

I would like to generate a SQL query to find all duplicate records in my barcode file where each record of the barcode has a date range for valid date.

Say the table is the following...

Barcode, ItemNo, StartDate, EndDate

At any date, there can only be 1 Barcode associated to 1 ItemNo.
How do I write a query to generate all the records that the valid date range overlap?

HermanStart Free Trial
[+][-]05.13.2008 at 06:49AM PDT, ID: 21554981

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 06:54AM PDT, ID: 21555020

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 07:00AM PDT, ID: 21555078

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 07:06AM PDT, ID: 21555131

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 07:20AM PDT, ID: 21555277

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 07:27AM PDT, ID: 21555350

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 07:30AM PDT, ID: 21555397

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Databases Miscellaneous, MS SQL Server, SQL Query Syntax
Tags: Microsoft, SQL Server DTS, 2000
Sign Up Now!
Solution Provided By: Milleniumaire
Participating Experts: 2
Solution Grade: A
 
 
[+][-]05.13.2008 at 07:57AM PDT, ID: 21555680

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628