I load data from SQL to CSV file. And my csv records are in the following way.
Eid ename desig sourceD location
1 Ralf PM 1 UK
1 Ralf PM 1 USA
2 Marty PL 3 GBR
3 Levis BA 5 UK
4 Ricky BI 7 RSA
4 Ricky BI 7 FRA
now i want to combine EID 1 and 4 into single rows. My output has to be in the following way
Eid ename desig sourceD location
1 Ralf PM 1 UK, USA
2 Marty PL 3 GBR
3 Levis BA 5 UK
4 Ricky BI 7 RSA, FRA
I have only CSV File i dont have any sql Query or anything.
SQL Fiddle
SQL Query
Working ?
If you want without comma in the end:
This Query will let you avoid lenght 0: