Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2005
    Posts
    1

    Unanswered: How to extract only 1 record for each staff?

    Hi,
    I have more than 1 record for each staff. This is the sample of record,

    StaffNo Field1 Field2 Field3
    50424 Data1 Data2 Data3
    80336 Data1 Data2 Data3
    50424 Data4 Data5 Data6
    50424 Data7 Data8 Data9
    80336 Data4 Data5 Data6

    Is it possible for me to extract only 1 record for each staff? The result should be like this..

    StaffNo Field1 Field2 Field3
    50424 Data1 Data2 Data3
    80336 Data1 Data2 Data3

    Any idea? I used DISTINCT in sql statement but it's not working because the record is unique.
    Thanx in advance..

  2. #2
    Join Date
    Nov 2002
    Posts
    272
    Quote Originally Posted by adia1979
    Is it possible for me to extract only 1 record for each staff?
    Sure it is. You need to put some condition in the WHERE clause to determine which one you want.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •