October 28, 2003 at 9:34 am
I have 2 tables, one called 'Names' (ID int, Name varchar), and another called 'Schedule' (ID int, nameID int, startTime datetime, endTime datetime). The schedule table is related to the names one via the nameID field. Basically they are tables of peoples names and times that they are scheduled to work. What I would like to do is have someone select a date range and create a report for all people of the times they work for that period. I would like to have the dates selected be column headers, the name of the person be the row header, and the time they work for that specific date as the data. Is this a cross-tab query? If not, does anyone know a way to do this, my SQL skills are lacking here?
Thank you in advance for any help offered
October 31, 2003 at 8:00 am
This was removed by the editor as SPAM
October 31, 2003 at 12:58 pm
Here's a crosstab query I created:
http://www.sqlservercentral.com/scripts/contributions/936.asp
Hope this helps somewhat.
October 31, 2003 at 1:09 pm
Thanks, I appreciate the info. However, I actually found a different way to get around the problem in my program. Sorry, I should have posted that on the topic once I figured it out. I will take a look at that cross-tab query though, as I think I'm going to need to know how to do these in the future.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply