SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    SQA Knight bklabel1's Avatar
    Join Date
    Sep 2012
    Location
    Kew Gardens, United States
    Posts
    2,730
    Post Thanks / Like
    Blog Entries
    1
    Mentioned
    2 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0

    How do you look for duplicate rows in a data table?

    Q: How do you look for duplicate rows in a data table?

    I think that the answer is to use GROUP BY but I'm not sure.

    Also a sub query that calls itself with @ parameters might work but I'm also not sure it is correct or how to do this.

    Suggestions anyone?

    Thanks,

    Kevin
    When in Florida, Don't Tampa with the code. I made this up.

  2. #2
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,605
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

  3. #3
    SQA Knight bklabel1's Avatar
    Join Date
    Sep 2012
    Location
    Kew Gardens, United States
    Posts
    2,730
    Post Thanks / Like
    Blog Entries
    1
    Mentioned
    2 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0
    NoUse4aName,
    I appreciate the link and it is some good Java to study.
    The question they asked was how to find them and not how to remove them.
    i guess I could alter the code and make an output list of the duplicates.
    Thanks,
    Kevin
    When in Florida, Don't Tampa with the code. I made this up.

  4. #4
    SQA Knight bklabel1's Avatar
    Join Date
    Sep 2012
    Location
    Kew Gardens, United States
    Posts
    2,730
    Post Thanks / Like
    Blog Entries
    1
    Mentioned
    2 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0
    I looked again and noticed that it is C# rather than Java. I didn't realize that they look so similar.
    Thanks,
    Kevin
    When in Florida, Don't Tampa with the code. I made this up.

  5. #5
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,605
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0
    Yeah, language is largely irrelevant. Just need the algorithm then you can implement in appropriate language. In vbs for example the hash table just becomes a dictionary.

    The array duplicateList in that code will give you the duplicate list. Just remove the remove command.

 

 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 12.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 01:40 PM.

Copyright BetaSoft Inc.