Most
of the scripts I've used to populate date dimension uses a cursor. Since data
is loaded only once to a date dimension in the ETL life cycle, using a cursor
isn't a sin. Still, when I was reviewing my own code the other day, I wanted to
get rid of the cursor. Why not, Right? Here is a script that uses CTE and
Window Functions to populate the date dimension.
Continue
here >