with cteN as
( select fabric_type = '0' union select '1'
union select '2' union select '3' union select '4' union select '5'
union select '6' union select '7' union select '8' union select '9')
, cteL as
( select fabric_type = 'A'
union select 'B'
union select 'C'
union select 'D'
union select 'E'
union select 'F'
union select 'G'
union select 'H'
union select 'I'
union select 'J'
union select 'K'
union select 'L'
union select 'M'
union select 'N'
union select 'O'
union select 'P'
union select 'Q'
union select 'R'
union select 'S'
union select 'T'
union select 'U'
union select 'V'
union select 'W'
union select 'X'
union select 'Y'
union select 'Z'
),
cteAll as
(SELECT fabric_type = CteL.fabric_type + cteN.fabric_type
from cteL
cross join cteN
)
select *
from cteAll
order by 1
|