aakshi jain
asked on
Query group by data in SQL Server - cursor?
Hello Experts,
Need this.
Data(changed data)
Keycol data
1 O1
1 O2
1 O3
2 O4
3 O5
3 O5
7 O2
7 O1
Output I need below
Keycol data LineNo
1 O1,O2,O3 1
2 O4 2
3 O5 3
7 O1,O2 4
possible in sql query? I need to generate sequential number for a new column.
DO i need a loop or cursor forthis?
Thank you
Need this.
Data(changed data)
Keycol data
1 O1
1 O2
1 O3
2 O4
3 O5
3 O5
7 O2
7 O1
Output I need below
Keycol data LineNo
1 O1,O2,O3 1
2 O4 2
3 O5 3
7 O1,O2 4
possible in sql query? I need to generate sequential number for a new column.
DO i need a loop or cursor forthis?
Thank you
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER