Search code examples
sqlms-accesstextlongtextmemo

How can I query a table to find duplicate Memo field entries?


How can I query a table to find duplicate Memo field entries in MS Access?

Also please note that I don't have a primary key in my table.


Solution

  • Here is one possible method:

    select t.MemoField
    from YourTable t
    group by t.MemoField
    having count(*) > 1
    

    To test for duplication across multiple fields, you might use:

    select t.MemoField1, t.MemoField2, t.MemoField3
    from YourTable t
    group by t.MemoField, t.MemoField2, t.MemoField3
    having count(*) > 1