Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Topic: Crosstab? Adding dates.. Posted: 17 Jul 2013 at 10:56am
Hi
Doinga crosstab report with grouping on client name and starttime which is a datetime basing report on one month 1st thru last day and the value of a code am pm or am pm depending if they had two starttimes that day one in the am one in the pm .
Question is sone clients only have data for certains days on the month I would like ti display 1 thru last day with blanks on days without codes
example looks like this
Client AA 3 4 5 7 AM pm pm am
I would like it to look like this 1 2 3 4 5 6 7 Client AA AM pm pm am
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 17 Jul 2013 at 11:00am
best way is to use another table that has a row per date (basically a calendar table), left join to it and use your select statement to use the dates from that table instead of your client table.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum