By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,946 Members | 745 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,946 IT Pros & Developers. It's quick & easy.

Turning Columns into Rows - Any easy way?

P: 3
I can't do it in Crystal Repots either without making a formula for each field so I thought about using 'copy an existing table structure wo/the data' (like to make a new table and append records to eliminate duplicates) to an increased field element table but that did not work even adding a qry...
I just want to take a random number of rows of patient id's containing lab data and as the qry reads the rows, post the lab data from each row into one single row into a new table.
It's the easiest thing that always causes the most exhasperation!
Oct 27 '06 #1
Share this Question
Share on Google+
3 Replies


PEB
Expert 100+
P: 1,418
PEB
Hi,

There is a way to do it... :)

You need to create a complementary table in which you insert the column names of your table with data... I suppose that in your Destination row table will be a field tha describes what kind information is it...

So when the complementary table is ready you create an Append query

based on the complementary table and your source table... You don't make a join btwn them!

Int the field description you put the field from the complementary table...

For the field with the information is a bit more difficult...

For it you need for the function Switch, the ID of the respective record and function like dlookup and all this in combination like:

Information: Switch([Description]="Field1", Dlookup("Field1","Mytable","ID="+str([ID])),[Description]="Field2", Dlookup("Field2","Mytable","ID="+str([ID])),.....,[Description]="Fieldn", Dlookup("Fieldn","Mytable","ID="+str([ID])))


So this is all!

:)
Oct 27 '06 #2

P: 3
Thank you, this will make my life quite a bit easier, I do crystal reporting and it's pretty difficult in that realm, appreciate it !


Hi,

There is a way to do it... :)

You need to create a complementary table in which you insert the column names of your table with data... I suppose that in your Destination row table will be a field tha describes what kind information is it...

So when the complementary table is ready you create an Append query

based on the complementary table and your source table... You don't make a join btwn them!

Int the field description you put the field from the complementary table...

For the field with the information is a bit more difficult...

For it you need for the function Switch, the ID of the respective record and function like dlookup and all this in combination like:

Information: Switch([Description]="Field1", Dlookup("Field1","Mytable","ID="+str([ID])),[Description]="Field2", Dlookup("Field2","Mytable","ID="+str([ID])),.....,[Description]="Fieldn", Dlookup("Fieldn","Mytable","ID="+str([ID])))


So this is all!

:)
Oct 30 '06 #3

P: 8
Hello, I am working on converting columns to rows in access.

I have three columns in a query, applican'ts first name, applicant's last name, and manager's name. I need to make a query such that applicant first name, applicant last name columns remain as the 1st and 2nd columns of the query, but managers names will appear as a row so that each manager can writer their decision reagarding each applicant.

Could you help me with this? I don't know any coding.

I appreciate your help.
Feb 24 '11 #4

Post your reply

Sign in to post your reply or Sign up for a free account.