Display Rows as Columns in Query Result

C

Charles Law

I used to have a table with columns

ID
FieldA
FieldB
FieldC
....

The following query would put FieldA in column 2, FieldB in column 3, and so
on

SELECT ID, FieldA, FieldB, FieldC FROM MyTable

I have normalized the table into two tables, where the second table has a
row for each of FieldA, FieldB, FieldC, etc. and links to the first table,
so a simple query would produce

ID FieldColumn
1 FieldA
1 FieldB
2 FieldA
2 FieldB
2 FieldC
3 FieldB
....

Can anyone suggest a query on the two new tables that would produce the same
result as I had from the original one table?

TIA

Charles
 
C

Charles Law

Not too worry. I have just seen the post from Raj Patel that answers my
question.

Charles
 

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