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:
Expand|Select|Wrap|Line Numbers
- 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:
Expand|Select|Wrap|Line Numbers
- TRANSFORM First(tmpTMS.FShift) AS FirstOfFShift
- SELECT tmpTMS.EMP_ID
- FROM tmpTMS
- GROUP BY tmpTMS.EMP_ID
- PIVOT tmpTMS.rdate;
Any suggestions please?