TSQL Challenge 14 - Basic Testing



We did the basic testing on the solutions that passed the initial screening. Here is the data used for the basic testing.

declare @t table (Data varchar(40))
insert @t
SELECT '9992EDC6-D117-4DEE-B410-4E5FAE46AE97' UNION ALL
SELECT '0BFC936B-BD9A-4C6A-AFB2-CF3F1752F8B1' UNION ALL
SELECT '4A73E7EB-7777-4A04-9258-F1E75097977C' UNION ALL
SELECT '5AAF477C-274D-400D-9067-035968F33B19' UNION ALL
SELECT '725DA718-30D0-44A9-B36A-89F27CDFEEDE' UNION ALL
SELECT '8083ED5A-D3B9-4694-BB04-F0B09C588888'

SELECT * FROM @t 
/*
Data
----------------------------------------
9992EDC6-D117-4DEE-B410-4E5FAE46AE97
0BFC936B-BD9A-4C6A-AFB2-CF3F1752F8B1
4A73E7EB-7777-4A04-9258-F1E75097977C
5AAF477C-274D-400D-9067-035968F33B19
725DA718-30D0-44A9-B36A-89F27CDFEEDE
8083ED5A-D3B9-4694-BB04-F0B09C588888
*/

Here is the expected output based on the above sample data.

data                                     char pos         len
---------------------------------------- ---- ----------- -----------
8083ED5A-D3B9-4694-BB04-F0B09C588888     B    20          2
8083ED5A-D3B9-4694-BB04-F0B09C588888     8    32          5
4A73E7EB-7777-4A04-9258-F1E75097977C     7    10          4
4A73E7EB-7777-4A04-9258-F1E75097977C     7    34          2
9992EDC6-D117-4DEE-B410-4E5FAE46AE97     9    1           3
9992EDC6-D117-4DEE-B410-4E5FAE46AE97     1    11          2
9992EDC6-D117-4DEE-B410-4E5FAE46AE97     E    17          2
5AAF477C-274D-400D-9067-035968F33B19     A    2           2
5AAF477C-274D-400D-9067-035968F33B19     7    6           2
5AAF477C-274D-400D-9067-035968F33B19     0    16          2
5AAF477C-274D-400D-9067-035968F33B19     3    32          2
725DA718-30D0-44A9-B36A-89F27CDFEEDE     4    15          2
725DA718-30D0-44A9-B36A-89F27CDFEEDE     E    33          2

Note that the number of columns in the output and the order of columns in the output should match with the sample results given above.