Forum Discussion

imani_tech's avatar
imani_tech
Frequent Visitor
8 years ago
Solved

Problem with GROUP BY for Duplicates

The source table has 3 columns: [User] [Delegate] [Permissions]   The three columns combined should create a compound natural key, but I have found some duplicates using T-SQL;   SELECT   [Us...
  • MFelix's avatar
    MFelix
    8 years ago

     Hi imani_tech,

     

    Made a small CSV file with the same fields as you have:

    UserDelegatePermissions

    AAAAAA
    AAABBB
    AAABBB
    BBBAAA
    CCCAAA
    CCCBBB
    CCCCCC
    CCCCCC

     

    As you can see I have repeated items, then made the grouping in Query editor and the result gives the duplicate in the count rows:

     

     

    Are you already getting the information from the CSV or from the SQL that you had in your previous post?

     

    Regards,

    MFelix