Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Posts
    7

    Unanswered: duplicate fields

    Hello. I am just wondering is there any way to tell if i have duplicates in a row?

    something like...

    SELECT s.date
    FROM stat s
    WHERE s.date = (SELECT t.date
    FROM stat
    WHERE t.date=s.date);

    But this will bring back just a list... if u need more clarification please let me know...

  2. #2
    Join Date
    Mar 2004
    Location
    California
    Posts
    58
    So basically what you are trying to do is that see if the same date occurs multiple times in the col for different rows right?

    in that case to make sure that you dont compare the same row to itself add the condition that t.rowid!=s.rowid

    However if this is not what you are looking to do then please elobrate on your issue
    Last edited by da_coolestofall; 03-30-04 at 15:52.

  3. #3
    Join Date
    Apr 2003
    Location
    NY
    Posts
    208
    You can also do a group by and add a having clause.

    SELECT s.date
    FROM stat s
    GROUP BY s.date
    HAVING count(s.date) > 1

    this will only return rows that have more than 1 record.

Posting Permissions

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