Find duplicates, concatenate cells

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sonny Thai
    New Member
    • Sep 2010
    • 1

    Find duplicates, concatenate cells

    Hello all,

    I have a database where I need to find duplicate rows based on one cell and concatenate the two cells from both into one record. For example i'll have:


    Code:
    ID             NameOne               IDNumber
    
    1              John                        2983
    
    2              Jones                      2983
    
    3              James                     2984

    I'm wondering if there is a SQL statement where I can search for the duplicates of "2983" and come out with a record of:
    Code:
    ID             NameOne               IDNumber
    
    1              John Jones              2983
    
    2              James                     2984

    I've tried loading this into a Datatable and searching through it, but I get out of bounds errors when I try to jump ahead in the search for the next IDNumber to match with the current one. So i'm resorting to an SQL statement (which by searching the net I figure its possible) Thanks in advance!
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    Here, tweak this

    Happy Coding!!!

    ~~ CK

    Comment

    Working...