Results 1 to 3 of 3

Thread: SQL Problems

  1. #1
    Join Date
    Sep 2003
    Location
    Raleigh, NC
    Posts
    183

    Lightbulb Unanswered: SQL Problems

    I have tbl with two field StudyID (Auto#) as PK and StudyNo (#)

    I'm trying to write SQL to retrive all distict values. I'm not able to get the right result because i have PK as Auto#. I have SQL statement with DISTINCT keywrd but it still returns all duplicate.

    Is there anyother way to accomplish this ?

    Thanks
    Skharva

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Re: SQL Problems

    Originally posted by Skharva
    I have tbl with two field StudyID (Auto#) as PK and StudyNo (#)

    I'm trying to write SQL to retrive all distict values. I'm not able to get the right result because i have PK as Auto#. I have SQL statement with DISTINCT keywrd but it still returns all duplicate.

    Is there anyother way to accomplish this ?

    Thanks
    Show us your query ... Does it include the StudyID?

  3. #3
    Join Date
    Sep 2003
    Location
    Raleigh, NC
    Posts
    183

    Re: SQL Problems

    Originally posted by M Owen
    Show us your query ... Does it include the StudyID?
    My query did include StudyID but i took that off and now it wrks fine with only one field StudyNO

    SELECT DISTINCT tblStudyInfo.StudyNo
    FROM tblStudyInfo;


    Thanks
    Skharva

Posting Permissions

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