CrossTab: Time Block/interval

L

LeeTV

Hi,
I am trying to create a cross-tab query with the time that a patient is
admitted to the hospital. however, the Columns i need to have the total count
per hour, and the rows the list of the doctors. the count for each time
interval will be based upon the count(MedRecNum).
Bascially, I am able to create the cross-tab, but the "time column headings"
are showing as the actual times, and not grouping together for the
hour/interval that i need.
can someone please help.
thanks
Lee
 
L

Lord Kelvan

you would need to post your sql for us to have a look at the query
remember we cannot see your screen

to do this open your query click on view then sql view and paste the
contents into the group as a post for us to see

Regards
Kelvan
 
G

Graham Wideman [Visio MVP]

Hi Lee,

The key thing you need to do for your time column headings is to create a
new column that transforms the time variable (AdmitTime let's say) into a
categorical variable, which from your description looks like it should bin
the data by hour.

So, something like

AdmitTimeCat: Format([AdmitTime],"yyyy-mm-dd hh")

.... would do the trick.

Hope that helps,

Graham
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top