14bc0 Query Duplicate Records & Dates
Sign Up |  Live StatsLive Stats    Articles 37,317| Comments 177,145| Members 19,403, Newest Jassi1262| Online 540
Home Contact
 (Forgotten?): 
    Sikhism
    For best SPN experience, use Firefox Internet Browser!


                                                                   Your Banner Here!    




Query Duplicate Records & Dates

Our Donation Goal : Why Donate? : Donate Today! : Donate Anonymously (ਗੁਪਤ) : Our Family of Supporters
Goal this month: 500 USD, Received: 115 USD (23%)
Please Donate...
     
Related Topics...
Thread Thread Starter Forum Replies Last Post
Duplicate in query Levans digital Information Technology 2 28-Jul-2006 08:17 AM
Filtering records in a query based on field values in adjacent records sdisalvo Information Technology 2 28-Jul-2006 08:12 AM
duplicate certain records in 2 linked tables Manny Information Technology 1 28-Jul-2006 08:07 AM
How do I remove duplicate records from a table? CyberQban Information Technology 2 28-Jul-2006 08:04 AM
Duplicate records in a subform Barry Information Technology 10 10-Nov-2005 21:08 PM


Tags
query, duplicate, records, dates
Reply Post New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!
  #1 (permalink)  
Old 28-Jul-2006, 08:32 AM
sgyvln's Avatar sgyvln
Guest
 
Posts: n/a
   
   
Query Duplicate Records & Dates

  Donate Today!   Email to Friend  Tell a Friend   Show Printable Version  Print   Contact sikhphilosophy.net Administraion for any Suggestions, Ideas, Feedback.  Feedback  

Register to Remove Advertisements
Hi,

I have a table of employees' history of start and term dates. Start and
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/12790-query-duplicate-records-and-dates.html
Term Dates constantly changes so there will be several records attached to
the employee. I need to create a query listing the current employee who is
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12790
working and another one listing employees who are no longer on assignment.

How do I extract just the most recent dates and ensure that there are no
duplicate names in both list?

Version: Access 2003, Professional

Appreciate the help, Thanks!

*







Got anything to share on This Topic? Why not share your immediate thoughts/reaction with us! Login Now! or Sign Up Today! to share your views... Gurfateh!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 28-Jul-2006, 08:32 AM
Pieter Wijnen's Avatar Pieter Wijnen
Guest
 
Posts: n/a
   
   
Re: Query Duplicate Records & Dates

A starter would be

SELECT E.EMPLOYEEID, -1 AS OCCUPIED FROM EMP E
WHERE E.START >= DATE() AND E.TERM <= DATE()
UNION ALL
SELECT E.EMPLOYEEID,0 FROM EMP E
WHERE NOT EXISTS (SELECT 'X' FROM EMP AS E2
WHERE E2.EMPLOYEEID= E2.EMPLOYEEID AND START >= DATE() AND E2.TERM <=
DATE())

HTH

Pieter

"sgyvln" wrote in message
news:7F586B63-466D-4221-BB60-C5E67F72FBCB@microsoft.com...
> Hi,
>
> I have a table of employees' history of start and term dates. Start and
> Term Dates constantly changes so there will be several records attached to
> the employee. I need to create a query listing the current employee who
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12790
> is
> working and another one listing employees who are no longer on assignment.
>
> How do I extract just the most recent dates and ensure that there are no
> duplicate names in both list?
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12790
>
> Version: Access 2003, Professional
>
> Appreciate the help, Thanks!



Reply With Quote
  #3 (permalink)  
Old 28-Jul-2006, 08:32 AM
Pieter Wijnen's Avatar Pieter Wijnen
Guest
 
Posts: n/a
   
   
Re: Query Duplicate Records & Dates

  Donate Today!  
A starter would be

SELECT E.EMPLOYEEID, -1 AS OCCUPIED FROM EMP E
WHERE E.START >= DATE() AND E.TERM <= DATE()
UNION ALL
SELECT E.EMPLOYEEID,0 FROM EMP E
WHERE NOT EXISTS (SELECT 'X' FROM EMP AS E2
WHERE E2.EMPLOYEEID= E2.EMPLOYEEID AND START >= DATE() AND E2.TERM <=
DATE())

HTH

Pieter

"sgyvln" wrote in message
news:7F586B63-466D-4221-BB60-C5E67F72FBCB@microsoft.com...
> Hi,
>
> I have a table of employees' history of start and term dates. Start and
> Term Dates constantly changes so there will be several records attached to
> the employee. I need to create a query listing the current employee who
> is
> working and another one listing employees who are no longer on assignment.
>
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12790
> How do I extract just the most recent dates and ensure that there are no
> duplicate names in both list?
>
> Version: Access 2003, Professional
>
> Appreciate the help, Thanks!




--
----------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 4182 spam emails to date.
Paying users do not have this message in their emails.
Get the free SPAMfighter here: http://www.spamfighter.com/len
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12790


Reply With Quote
   Click Here to Donate Now!

Support Us!
Become a Promoter!
Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh!
ReplyPost New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!

Bookmarks


(View-All Members who have read this thread : 0
There are no names to display.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Tools Search
Search:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

» Active Discussions
30 Day Amrit Vel 'a'...
Today 12:53 PM
34 Replies, 348 Views
Do you believe in...
Today 12:00 PM
184 Replies, 3,844 Views
What Do You Think of...
Today 11:59 AM
36 Replies, 638 Views
Thought of the Moment!
Today 10:07 AM
109 Replies, 5,115 Views
Amrit
Today 09:17 AM
5 Replies, 355 Views
Losing My Religion: Why...
By Akasha
Today 07:19 AM
2 Replies, 83 Views
What I believe Hukam to...
Today 03:15 AM
13 Replies, 160 Views
Should SPN Keep the...
Today 02:02 AM
19 Replies, 567 Views
Rozana Reports (ਪੰਜਾਬੀ...
Today 01:46 AM
304 Replies, 7,486 Views
Sikh Spokesman (ਪੰਜਾਬੀ...
Today 01:18 AM
173 Replies, 4,389 Views
Student Compares Toilet...
Today 01:05 AM
1 Replies, 77 Views
Map shows world's 'most...
Yesterday 18:58 PM
16 Replies, 285 Views
BHOOTS (Ghosts) and...
Yesterday 13:08 PM
102 Replies, 13,893 Views
How does Sikhi help you...
Yesterday 12:44 PM
17 Replies, 715 Views
Why are There so Many...
Yesterday 10:23 AM
70 Replies, 5,073 Views
» Books You Should Read...
Powered by vBadvanced CMPS v3.2.3
All times are GMT +6.5. The time now is 13:11 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2 Copyright © 2004-12, All Rights Reserved. Sikh Philosophy Network


Page generated in 0.41636 seconds with 32 queries
0