I am trying to write a simple aging style view in SQL Server Express 2005 and am running into issues.
I have a table with a list of 45k + people each person has what is called a trigger date. What need to do is create a view that would convert this table into a pivot table with 8 columns:
90+future | 60-90future | 30-60future | 0-30future | 0-30Past | 30-60past | 60-90past | 90+past
Each column would contain the count of records where the trigger date falls into the date range as realted to todays date.
I am currently using 8 views to get the count and know this is the wrong way to go about doing this so I want to make it correct.
Any help would be appreciated.