Avatar of keplan
keplan
Flag for Australia

asked on 

eliminate duplicates and show the values on the columns for each non duplicate raws.

I have excel source as below and the need to be summarized the result shown below.


Excel Source:
Col1 Col2 Col3 Col4 Col5 Col6  col7
1       abc   tt     null   88   9      null
1       abc   tt     2      null  null   null
1       abc   tt      null  null  null  null
3       fgt    hh    null   3      null  null
3      fgt     hh    2      null   1      null
4      kkl    jj       null  8      3       1
4      kkl    jj      3     null    null   null

so as the data set, the col1, col2, col3 need to eliminated it duplicates, what I require the result as below :

col1   col2  col3 col4  col5  col6  col7
1       abc   tt     2      3       9      null
3       fgt    hh    2      3       1     null
4      kkl    jj      3       8      3       1

please give me solution to this
thanks in advance

Microsoft SQL Server 2008

Avatar of undefined
Last Comment
Guy Hengel [angelIII / a3]

8/22/2022 - Mon