Hi Guys,
I'm back with another question this time.. Stuck again :-(
Here's what I'm trying to do..
I have a table with three fields namely Emp_ID (Text), RDate (Date/Time), FShift (Text)
For every employee, I have 14 Records defining their roster for any given week; 2 Records for any given date defining their start & end time.
I need to output the following format in Excel:
RDATE is the column header which will be replaced with the respective date (Rdate Column Entries)
All goes fine till here...
I wrote a crosstab query to achieve this as under:
But this doesn't give me the duplicate column for the same date as required and also omits the data to be present in the second column.
Any suggestions please?
I'm back with another question this time.. Stuck again :-(
Here's what I'm trying to do..
I have a table with three fields namely Emp_ID (Text), RDate (Date/Time), FShift (Text)
For every employee, I have 14 Records defining their roster for any given week; 2 Records for any given date defining their start & end time.
I need to output the following format in Excel:
Code:
EMPID;RDATE1;RDATE1;RDATE2;RDATE2;RDATE3;RDATE3;RDATE4;RDATE4;RDATE5;RDATE5;RDATE6;RDATE6;RDATE7;RDATE7;
All goes fine till here...
I wrote a crosstab query to achieve this as under:
Code:
TRANSFORM First(tmpTMS.FShift) AS FirstOfFShift SELECT tmpTMS.EMP_ID FROM tmpTMS GROUP BY tmpTMS.EMP_ID PIVOT tmpTMS.rdate;
Any suggestions please?
Comment