Report on Name Value Pairs
am 25.01.2005 01:36:29 von Bryan Harrington
Greetings..
I have a table of Name/Value pairs that I need to report on. They are
results from a survey.
Format is like:
QuestionID, Answer
F1,8
F2,9
F3,1
F1,3
F2,4
F3,8
.... etc
I need to turn it on it's side I think.. so I get something along the lines
of:
F1 F2 F3
8 9 1
3 4 8
etc..
I know it's along the lines of a pivot table... but I'll be darned if I can
come up with the right thing to type into google!
Thanks for your help.
Re: Report on Name Value Pairs
am 25.01.2005 02:27:18 von reb01501
Bryan Harrington wrote:
> Greetings..
>
> I have a table of Name/Value pairs that I need to report on. They are
> results from a survey.
>
> Format is like:
>
> QuestionID, Answer
> F1,8
> F2,9
> F3,1
> F1,3
> F2,4
> F3,8
> ... etc
>
> I need to turn it on it's side I think.. so I get something along the
> lines of:
> F1 F2 F3
> 8 9 1
> 3 4 8
>
> etc..
I'm not clear about what you're after. Are you asking how to create a query
to generate these results? If so, we cannot answer without knowing what
database type and version you are using.
Also, are these the only two columns in your table? What, besides the order,
enables you to group 8,9 and 1 in the first row, and 3, 4 and 8 in the
second row. Why couldn't it be
F1 F2 F3
8 4 1
3 9 8
Without a third column to group those results, it will not be possible to do
this in a query.
Or are you asking how to pivot the results contained in a recordset using
vbscript?
>
> I know it's along the lines of a pivot table... but I'll be darned if
> I can come up with the right thing to type into google!
How about "pivot table"?
Or crosstab?
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"