I have an accounting table that contains a dollar amount field. I want to create a view that will return one row per penny of that amount with some of the other fields from the table.
So as a very simple example let's say I have a row like this:
PK     Amount     Date
---------------------------
123    4.80       1/1/2012
The query/view should return 480 rows (one for each penny) that all look like this:
PK      Date
-----------------
123     1/1/2012
What would be the most performant way to accomplish this? I have a solution that uses a table valued function and a temp table but in the back of my head I keep thinking there has got to be a way to accomplish this with a traditional view. Possibly a creative cross join or something that will return this result without having to declare too many resources in the form of temp tables, and tbf's etc. Any ideas?
 
     
     
    