I am developing a SQL database to cover operations that were previously
handled in a spreadsheet, and need to create a view or procedure that
presents data into a matrix format similar to what the users are currently
working with. There must be a way I can create this using Transact SQL but
I cant figure it at this point. What the users want is for data to be
presented in 7 continuous columns where each column shows records for 1 day
of a week and each record is presented as a 'block'. Any tips or hints from
people who have achieved something similar would be gratefully accepted.
A sample of the format appears below. (Set with tabs. Hope this
translates)
1/2/2004 2/2/2004 3/2/2004 4/2/2004 5/2/2004
6/2/2004 7/2/2004
Person Smith Jones Green
Room 1A 2B 3c
Start 9:00AM 8:00AM 8:00AM
End 5:00 PM 5:00 PM 5:00 PM
Person Brown White
Room 1D 1D
Start 9:00AM 9:00AM
End 5:00 PM 5:00 PM
Person Green
Room 1M
Start 9:00AM
End 5:00 PM
Notes
1. As the diagram shows, there is likely to be a different number of records
for each day.
2. It is not necessary to have the field headings appear on the left of the
view.
handled in a spreadsheet, and need to create a view or procedure that
presents data into a matrix format similar to what the users are currently
working with. There must be a way I can create this using Transact SQL but
I cant figure it at this point. What the users want is for data to be
presented in 7 continuous columns where each column shows records for 1 day
of a week and each record is presented as a 'block'. Any tips or hints from
people who have achieved something similar would be gratefully accepted.
A sample of the format appears below. (Set with tabs. Hope this
translates)
1/2/2004 2/2/2004 3/2/2004 4/2/2004 5/2/2004
6/2/2004 7/2/2004
Person Smith Jones Green
Room 1A 2B 3c
Start 9:00AM 8:00AM 8:00AM
End 5:00 PM 5:00 PM 5:00 PM
Person Brown White
Room 1D 1D
Start 9:00AM 9:00AM
End 5:00 PM 5:00 PM
Person Green
Room 1M
Start 9:00AM
End 5:00 PM
Notes
1. As the diagram shows, there is likely to be a different number of records
for each day.
2. It is not necessary to have the field headings appear on the left of the
view.
Comment