Can I do this with a query?

L

LAS

I have a table that has many rows for every value of student_id. It has one
of two different values in the column "Category", Exclusion and
Reintegration. Each row has a numeric value in the column "Elapsed_Time".

I want to create a report that looks like this.


For various subsets, based on date.


Student Exclusion Reintegration

sum(elapsed_time) sum(elapsed_time).


Can I get the values for sets of rows into columns so I can print this
report? I've looked at the pivot table view, but couldn't get it to do what
I wanted, but if someone says that's the way to go, I'll study up on it in a
serious way.

tia
las
 
J

John W. Vinson

I have a table that has many rows for every value of student_id. It has one
of two different values in the column "Category", Exclusion and
Reintegration. Each row has a numeric value in the column "Elapsed_Time".

I want to create a report that looks like this.


For various subsets, based on date.


Student Exclusion Reintegration

sum(elapsed_time) sum(elapsed_time).


Can I get the values for sets of rows into columns so I can print this
report? I've looked at the pivot table view, but couldn't get it to do what
I wanted, but if someone says that's the way to go, I'll study up on it in a
serious way.

tia
las

A Crosstab query will do this for you; use Student as the "row header" and
Category as the "column header", elapsed_time as the Value, and Sum as the
operator.

--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 

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