I have to try and create a view on transact sql (2000)
The view needs to show the values of the past 5 days data by metric.
Example of what i require
Metrics Today -4 Today -3 Today -2 Today-1 today
1 A&E Attendances Value Value Value Value Value
10 AvgLos 30 WARD Value Value Value Value Value
Up to 20metric Value Value Value Value Value
I have attached a file with the example data of what is required but I have also included below an example of the table it will be pulled from contains the past 5 days worth of data, a row for each day and each metrics (20+ in total) ie.
Metric Metrics Value Datestamp ID
1 1 A&E Attendances 234
09/03/2011108/03/2011A&EAttendances
1 1 A&E Attendances 258 08/03/2011 107/03/2011A&EAttendances
1 1 A&E Attendances 204 07/03/2011 106/03/2011A&EAttendances
1 1 A&E Attendances 17 05/03/2011 104/03/2011A&EAttendances
10 10 AvgLos 30 WARD 25 09/03/2011 1008/03/2011AvgLos30WARD etc.......
Please would you help.
I have tried various ways but cannot seem to get the unique value (it is not a sum or average just the field value) per day, per metrics
Thank you very much.
The view needs to show the values of the past 5 days data by metric.
Example of what i require
Metrics Today -4 Today -3 Today -2 Today-1 today
1 A&E Attendances Value Value Value Value Value
10 AvgLos 30 WARD Value Value Value Value Value
Up to 20metric Value Value Value Value Value
I have attached a file with the example data of what is required but I have also included below an example of the table it will be pulled from contains the past 5 days worth of data, a row for each day and each metrics (20+ in total) ie.
Metric Metrics Value Datestamp ID
1 1 A&E Attendances 234
09/03/2011108/03/2011A&EAttendances
1 1 A&E Attendances 258 08/03/2011 107/03/2011A&EAttendances
1 1 A&E Attendances 204 07/03/2011 106/03/2011A&EAttendances
1 1 A&E Attendances 17 05/03/2011 104/03/2011A&EAttendances
10 10 AvgLos 30 WARD 25 09/03/2011 1008/03/2011AvgLos30WARD etc.......
Please would you help.
I have tried various ways but cannot seem to get the unique value (it is not a sum or average just the field value) per day, per metrics
Thank you very much.