access 2003 column to row

G

Guest

I have a query that results in one row (record) with 14 fields. Those
feilds correspond to 14 rows (records) in another query. I need to match up
the rows to the records in a query and preform additional calculations on the
matched fields.

As additional information: My queries and the desired result are below:

Query 1

Date Expression1 Expression2 Expression3 Expression4 Expression 5
DD %% %% %% %% %%

Query2

This database is sorted so that it is grouped on "Expression ?"
Catatory $ Portfolio
Expression1 $$
Expression2 $$
Expression3 $$
Expression4 $$
Expression5 $$

The Query 1 results in 1 record. I want a new query that matches the
Portfolio $ to the %. The desired result is below:


Query 3
Catatory $ Portfolio Percent by catagory
Expression1 $$ %%
Expression2 $$ %%
Expression3 $$ %%
Expression4 $$ %%
Expression5 $$ %%

Any help would be appreciated.
 
G

Gary Walter

It is not apparent to me if you have more than
one record in Query1, but I believe you will have
to use UNION query to make Query1 "thin."

qryUnion

SELECT
"Expression1" As Exp
Expression1 As ExpVal
FROM
Query1
UNION
SELECT
"Expression2",
Expression2
FROM
Query1
UNION
SELECT
"Expression3",
Expression3
FROM
Query1
UNION
SELECT
"Expression4",
Expression4
FROM
Query1
UNION
SELECT
"Expression5",
Expression5
FROM
Query1;

then join qryUnion to Query2
 

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