with result as(
select t.str from(
select '' str
union all
select '' str
union all
select '' str
union all
select '' str
union all
select '' str
union all
select '' str
union all
select '' str
) t
cross apply
(select t2.str from(
select '' str
union all
select '' str
union all
select '' str
union all
select '' str
) t2
where t.str = t2.str) t3)
select * from result;
go
with result as(
select t.str from(
select '' str
union all
select '' str
union all
select '' str
union all
select '' str
union all
select '' str
union all
select '' str
union all
select '' str
) t
outer apply
(select t2.str from(
select '' str
union all
select '' str
union all
select '' str
union all
select '' str
) t2
where t.str = t2.str) t3)
select * from result;
go
select t.str from(
select '' str
union all
select '' str
union all
select '' str
union all
select '' str
union all
select '' str
union all
select '' str
union all
select '' str
) t
cross apply
(select t2.str from(
select '' str
union all
select '' str
union all
select '' str
union all
select '' str
) t2
where t.str = t2.str) t3;
go