Skip to content

Instantly share code, notes, and snippets.

@jbnv
Created July 8, 2015 23:26
Show Gist options
  • Save jbnv/37fbe86c1a6c3b7dcb2b to your computer and use it in GitHub Desktop.
Save jbnv/37fbe86c1a6c3b7dcb2b to your computer and use it in GitHub Desktop.
Years view (SQL)
select n1000.n+n10.n*10+n1.n
from (select n=1900 union select 2000) n1000
cross join dbo.Numbers n10
cross join dbo.Numbers n1
--where n1000.n+n10.n*10+n1.n between 1900 and 2099
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment