add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
select @@version;
(No column name)
Microsoft SQL Server 2022 (RTM) - 16.0.1000.6 (X64)
Oct 8 2022 05:58:25
Copyright (C) 2022 Microsoft Corporation
Express Edition (64-bit) on Windows Server 2019 Standard 10.0 <X64> (Build 17763: ) (Hypervisor)
CREATE TABLE def (
R INT,
Column1 VARCHAR(MAX));
INSERT INTO def (R,Column1) VALUES
(1,N'xxx,20080501,xxx,xxx:175000,55008654,0178636,202307011001,001859915,OK,W,xx,1.0,00000100,4,202307010100,R0,1,202307010200,R0,0,202307010300,R0,1,202307010400,R0,0'),
(2,N'xxx,20080501,xxx,xxx:175000,55008654,0178636,202307011001,001859915,OK,W,xx,1.0,00000100,48,202306290100,R0,2,202306290200,R0,0,202306290300,R0,0,202306290400,R0,0,202306290500,R0,1,202306290600,R0,1,202306290700,R0,0,202306290800,R0,0,202306290900,R0,0,202306291000,R0,0,202306291100,R0,0,202306291200,R0,1,202306291300,R0,0,202306291400,R0,0,202306291500,R0,2,202306291600,R0,1,202306291700,R0,0,202306291800,R0,0,202306291900,R0,0,202306292000,R0,0,202306292100,R0,0,202306292200,R0,0,202306292300,R0,2,202306300000,R0,3,202306300100,R0,0,202306300200,R0,0,202306300300,R0,2,202306300400,R0,0,202306300500,R0,1,202306300600,R0,1,202306300700,R0,3,202306300800,R0,0,202306300900,R0,0,202306301000,R0,0,202306301100,R0,0,202306301200,R0,3,202306301300,R0,1,202306301400,R0,0,202306301500,R0,1,202306301600,R0,1,202306301700,R0,0,202306301800,R0,0,202306301900,R0,1,202306302000,R0,0,202306302100,R0,1,202306302200,R0,0,202306302300,R0,1,202307010000,R0,0');

2 rows affected
SELECT * FROM def;
R Column1
1 xxx,20080501,xxx,xxx:175000,55008654,0178636,202307011001,001859915,OK,W,xx,1.0,00000100,4,202307010100,R0,1,202307010200,R0,0,202307010300,R0,1,202307010400,R0,0
2 xxx,20080501,xxx,xxx:175000,55008654,0178636,202307011001,001859915,OK,W,xx,1.0,00000100,48,202306290100,R0,2,202306290200,R0,0,202306290300,R0,0,202306290400,R0,0,202306290500,R0,1,202306290600,R0,1,202306290700,R0,0,202306290800,R0,0,202306290900,R0,0,202306291000,R0,0,202306291100,R0,0,202306291200,R0,1,202306291300,R0,0,202306291400,R0,0,202306291500,R0,2,202306291600,R0,1,202306291700,R0,0,202306291800,R0,0,202306291900,R0,0,202306292000,R0,0,202306292100,R0,0,202306292200,R0,0,202306292300,R0,2,202306300000,R0,3,202306300100,R0,0,202306300200,R0,0,202306300300,R0,2,202306300400,R0,0,202306300500,R0,1,202306300600,R0,1,202306300700,R0,3,202306300800,R0,0,202306300900,R0,0,202306301000,R0,0,202306301100,R0,0,202306301200,R0,3,202306301300,R0,1,202306301400,R0,0,202306301500,R0,1,202306301600,R0,1,202306301700,R0,0,202306301800,R0,0,202306301900,R0,1,202306302000,R0,0,202306302100,R0,1,202306302200,R0,0,202306302300,R0,1,202307010000,R0,0
SELECT R, value
FROM def d
CROSS APPLY STRING_SPLIT((SELECT Column1 ), ',');

R value
1 xxx
1 20080501
1 xxx
1 xxx:175000
1 55008654
1 0178636
1 202307011001
1 001859915
1 OK
1 W
1 xx
1 1.0
1 00000100
1 4
1 202307010100
1 R0
1 1
1 202307010200
1 R0
1 0
1 202307010300
1 R0
1 1
1 202307010400
1 R0
1 0
2 xxx
2 20080501
2 xxx
2 xxx:175000
2 55008654
2 0178636
2 202307011001
2 001859915
2 OK
2 W
2 xx
2 1.0
2 00000100
2 48
2 202306290100
2 R0
2 2
2 202306290200
2 R0
2 0
2 202306290300
2 R0
2 0
2 202306290400
2 R0
2 0
2 202306290500
2 R0
2 1
2 202306290600
2 R0
2 1
2 202306290700
2 R0
2 0
2 202306290800
2 R0
2 0
2 202306290900
2 R0
2 0
2 202306291000
2 R0
2 0
2 202306291100
2 R0
2 0
2 202306291200
2 R0
2 1
2 202306291300
2 R0
2 0
2 202306291400
2 R0
2 0
2 202306291500
2 R0
2 2
2 202306291600
2 R0
2 1
2 202306291700
2 R0
2 0
2 202306291800
2 R0
2 0
2 202306291900
2 R0
2 0
2 202306292000
2 R0
2 0
2 202306292100
2 R0
2 0
2 202306292200
2 R0
2 0
2 202306292300
2 R0
2 2
2 202306300000
2 R0
2 3
2 202306300100
2 R0
2 0
2 202306300200
2 R0
2 0
2 202306300300
2 R0
2 2
2 202306300400
2 R0
2 0
2 202306300500
2 R0
2 1
2 202306300600
2 R0
2 1
2 202306300700
2 R0
2 3
2 202306300800
2 R0
2 0
2 202306300900
2 R0
2 0
2 202306301000
2 R0
2 0
2 202306301100
2 R0
2 0
2 202306301200
2 R0
2 3
2 202306301300
2 R0
2 1
2 202306301400
2 R0
2 0
2 202306301500
2 R0
2 1
2 202306301600
2 R0
2 1
2 202306301700
2 R0
2 0
2 202306301800
2 R0
2 0
2 202306301900
2 R0
2 1
2 202306302000
2 R0
2 0
2 202306302100
2 R0
2 1
2 202306302200
2 R0
2 0
2 202306302300
2 R0
2 1
2 202307010000
2 R0
2 0