I need to get value portion key to every 3 row on one row meaning
rn 1,2,3 one row KRM__21X0E100C0ADD
rn 1,2,3 one row KRM__21X0J100K0ADD
rn 1,2,3 on one row KRM__21X1C100D0ADD
create table #portiontableFinal
(
rn int,
ValuePortionKey nvarchar(100)
)
insert into #portiontableFinal(rn,ValuePortionKey)
values
(1,'KRM__21X0E100'),
(2,'C0AD'),
(3,'D'),
(1,'KRM__21X0J100'),
(2,'K0AD'),
(3,'D'),
(1,'KRM__21X1C100'),
(2,'D0AD'),
(3,'D')
RNValuePortionKey
1KRM__21X0E100
2C0AD
3D
1KRM__21X0J100
2K0AD
3D
1KRM__21X1C100
2D0AD
3D
I need to get from 1 to 3 on one rows as following :
final result I need to get as below :
KRM__21X0E100C0ADD
KRM__21X0J100K0ADD
KRM__21X1C100D0ADD