0

How would I go about splitting multiple date bands into individual dates?

So from something like this:

DateStart   DateEnd
----------  ----------
2013-01-01  2013-01-03
2013-01-06  2013-01-08

To something like this:

Date
----------
2013-01-01
2013-01-02
2013-01-03
2013-01-06
2013-01-07
2013-01-08
Andriy M
  • 76,112
  • 17
  • 94
  • 154
pix1985
  • 208
  • 1
  • 8

1 Answers1

1

Do a CROSS join to your calendar table using

WHERE day_of_calendar BETWEEN DateStart and DateEnd

Or switch to Teradata where's a nice EXPAND ON :-)

dnoeth
  • 59,503
  • 4
  • 39
  • 56