473,405 Members | 2,171 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Comparing certain fields within a duplicate records query

I have a table of 650,000 records associated to contracts. Some of
the contracts have multiple records but each contract only has one
Active Record (there might be several inactive records). There are
dates associated with each of the records (whether active or
inactive). I need to compare the dates between the active and
inactive contract records.

So far, I've created a "find duplicates query" for contract to
identify contracts that have active and inactive records. I then
tried to create a new query and an expression as follows:

(([Date]) and ([Status])="Active") < (([Date]) and
([Status])="Inactive"

This does not work. What I realy need to do is to find any contract
where the Date associated with the Active record is less than the Date
associated with the Inactive record for the same contract. Can
someone help to create this query/expression?

Thanks,

Jason A. Uberti
Nov 12 '05 #1
2 2733
On 27 Apr 2004 08:44:22 -0700, ja**********@prudential.com (Jason)
wrote:

Ad a sentence to your message: To download a sample version of my
database (Access version xxxxx), surf to: xxxxxxxxxxxx
For me at least, it is impossible to answer your question without
seeing the db design and some data in the relevant tables. Be sure NOT
to include all 650,000 rows, or we'll break out the tar and
feathers...

-Tom.

I have a table of 650,000 records associated to contracts. Some of
the contracts have multiple records but each contract only has one
Active Record (there might be several inactive records). There are
dates associated with each of the records (whether active or
inactive). I need to compare the dates between the active and
inactive contract records.

So far, I've created a "find duplicates query" for contract to
identify contracts that have active and inactive records. I then
tried to create a new query and an expression as follows:

(([Date]) and ([Status])="Active") < (([Date]) and
([Status])="Inactive"

This does not work. What I realy need to do is to find any contract
where the Date associated with the Active record is less than the Date
associated with the Inactive record for the same contract. Can
someone help to create this query/expression?

Thanks,

Jason A. Uberti


Nov 12 '05 #2
do u have another table with only the unique records?
if yes,
u may try to compare this unique table with the 650000 records table and
pull out the duplicates.

--

Thank you.

______________________________________
Lawrence Lee
"Jason" <ja**********@prudential.com> wrote in message
news:1a*************************@posting.google.co m...
I have a table of 650,000 records associated to contracts. Some of
the contracts have multiple records but each contract only has one
Active Record (there might be several inactive records). There are
dates associated with each of the records (whether active or
inactive). I need to compare the dates between the active and
inactive contract records.

So far, I've created a "find duplicates query" for contract to
identify contracts that have active and inactive records. I then
tried to create a new query and an expression as follows:

(([Date]) and ([Status])="Active") < (([Date]) and
([Status])="Inactive"

This does not work. What I realy need to do is to find any contract
where the Date associated with the Active record is less than the Date
associated with the Inactive record for the same contract. Can
someone help to create this query/expression?

Thanks,

Jason A. Uberti
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rado | last post by:
Hi All, This might quite simple process for some but I am finding it really difficult to do. What is required is not a standard Duplicate query but a variation on it. For example I have...
8
by: Riegnman | last post by:
Hey guys, I'm in need of a little help. I am very new to access but have been trying to learn. My problem is as follows. . . We have time clocks that dump the badge punches into a .log file on...
2
by: Jason | last post by:
I have a table of 650,000 records associated to contracts. Some of the contracts have multiple records but each contract only has one Active Record (there might be several inactive records). ...
0
by: Dale Ring | last post by:
Sorry about the dup post, somehow my original post was put on an existing thread instead of a new one. Access 2000 I am working with a service call database and would like to create a query...
0
by: Dale Ring | last post by:
Sorry about the dup post, somehow my original post was put on an existing thread instead of a new one. Access 2000 I am working with a service call database and would like to create a query...
8
by: Maxi | last post by:
There is a lotto system which picks 21 numbers every day out of 80 numbers. I have a table (name:Lotto) with 22 fields (name:Date,P1,P2....P21) Here is the structure and sample data: ...
2
by: steevp | last post by:
Hi, Please excuse the newbie type question, but I am wracking my brains to solve what should be a simple query. I have three fields in a table F1, F2, F3. Any of the fields may contain...
5
by: redstamp | last post by:
Try as I might I cannot find a way to write an access query to return a result set with the records from my database WITHOUT a certain set of values within a field. To explain, I have a table of...
4
by: BeeMarie | last post by:
Hi, I've been trying to figure out this query for several days. I'm not that familiar with writing SQL statements, but in order to get the results I want, I think I need a subquery which requires...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.