A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

make a table that transpose columns to rows in an access query



 
 
Thread Tools Display Modes
  #1  
Old November 9th, 2004, 03:00 PM
Mark
external usenet poster
 
Posts: n/a
Default make a table that transpose columns to rows in an access query

Can anyone tell me how to make a table that transpose columns to rows in an
access query? I don't want to have to send it excel, transpose it and then
re-import it to Access. I would like to beable to do it all in access.
Thanks for your help!!!

MG
  #2  
Old November 9th, 2004, 04:08 PM
JL
external usenet poster
 
Posts: n/a
Default

Try looking into crosstab query.

"Mark" wrote:

Can anyone tell me how to make a table that transpose columns to rows in an
access query? I don't want to have to send it excel, transpose it and then
re-import it to Access. I would like to beable to do it all in access.
Thanks for your help!!!

MG

  #3  
Old November 9th, 2004, 04:48 PM
Brian Camire
external usenet poster
 
Posts: n/a
Default

To transpose columns to rows, you might use a UNION query.

For example, if you had a table with columns A and B that looked something
like this:

A, B
1, 2
3, 4,
5, 6

and you wanted to get a result that looked something like this:

Attribute, Value
A, 1
A, 3
A, 5
B, 2
B, 4
B, 6

you might use a query whose SQL looked something like this:

SELECT
"A" AS [Attribute],
[Your Table].[A] AS [Value]
FROM
[Your Table]
UNION ALL
"B" AS [Attribute],
[Your Table].[b] AS [Value]
FROM
[Your Table]

UNION ALL (unlike just UNION) will preserve duplicates. So, for example, if
you had two rows in your table that had the same value of A, you would get
two corresponding rows (instead of just one) in your result. Check the Help
for details.

Hope this helps.

"Mark" wrote in message
...
Can anyone tell me how to make a table that transpose columns to rows in

an
access query? I don't want to have to send it excel, transpose it and then
re-import it to Access. I would like to beable to do it all in access.
Thanks for your help!!!

MG



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Autonumber Ally H. General Discussion 7 August 27th, 2004 04:51 PM
how can i make query forever read whatever table is currently in u access_confused Running & Setting Up Queries 1 August 2nd, 2004 09:49 PM
cant think of the query... Dragon Running & Setting Up Queries 5 July 21st, 2004 06:25 PM
Converting a table with rows of info into a table with columns Ernie Database Design 8 June 15th, 2004 01:59 AM


All times are GMT +1. The time now is 01:37 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.