transposing entries into a column from a row

G

Guest

I have a database which contains two tables which are joined by ActRef, the
table contain billing information, the second of which contains elements
which are to be billed.

When I do a select query on the joined tables I get a row for each billing
element. as below

accref element code ellement
1 23 discount
1 20 total due
1 23 discount
2 15 gross ysum
2 23 discount
3 20 total due
3 15 gross ysum
4 20 total due


I would like to create a new table where each element code and ellement are
fields on the same record as it appears below (the actual field names for the
elements can be changed)

Can anyone advise?

Many thanks
 
G

Guest

Phil said:
I have a database which contains two tables which are joined by ActRef, the
table contain billing information, the second of which contains elements
which are to be billed.

When I do a select query on the joined tables I get a row for each billing
element. as below

accref element code ellement
1 23 discount
1 20 total due
1 23 discount
2 15 gross ysum
2 23 discount
3 20 total due
3 15 gross ysum
4 20 total due


I would like to create a new table where each element code and ellement are
fields on the same record as it appears below (the actual field names for the
elements can be changed)

accref element code ellement element code ellement element code ellement
1 23 discount 20 total due 23 discount
2 15 gross ysum 23 discount
3 20 total due 15 gross ysum
4 20 total due
 

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