Over a million developers have joined DZone.

Weird Sql Query

·
// description of your code here


select convert(varchar(8),dateadd(dd , i.i * -1, dte.d ),112)
from 
(select 0 AS I union all 
select 1 union 
select 2 union 
select 3 union 
select 4 union 
select 5 union 
select 6
) i
CROSS join 
(select dateadd(dd,0,getdate()) AS D) dte
order by dte.d desc
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}