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  

Req Help with Crosstab query



 
 
Thread Tools Display Modes
  #1  
Old November 21st, 2006, 07:57 PM posted to microsoft.public.access.queries
pottymouthed
external usenet poster
 
Posts: 4
Default Req Help with Crosstab query

Assuming I have 2 tables.


t_sexes

sex_ID Sex_Name
1 Male
2 Female

and

t_names

name_ID name_name sex_id
1 jon 1
2 jason 1
3 Sue 2
4 Bill 1
5 Sally 2

How can I have my results show like this.

Male Jon,Jason,Bill
Female Sue,Sally

I have limited experience with pivot tables but I assume this is the
way to
go......thanks in advance for ahy help.


--
------------------------------------------------------
"A comet is, of course, frozen bodies of ice and dust formed over 4.6
billion years ago---or created 6,000 years ago, depending on whether
or not
you're wrong."
---Jon Stewart

  #2  
Old November 21st, 2006, 10:19 PM posted to microsoft.public.access.queries
David F Cox
external usenet poster
 
Posts: 493
Default Req Help with Crosstab query

first reaction: Why not Sex "M" or "F" ? - but that aside ...

What is going to be your column heading? It is going to have to be the same
for Jon and Sue, and for Jason and Sally, if you want those names in the
same column as in your example.

My guess is that you do not have a candidate for column variable. If so one
way to solve this would be to allocate a sequence number starting at 1 for
every male, and a similar sequence number starting at 1 for every female and
use those numbers as the column heading. You can then get that layout with a
crosstab query with Sex as the row variable, sequence as the column
variable, and name as the value variable.



"pottymouthed" wrote in message
oups.com...
Assuming I have 2 tables.


t_sexes

sex_ID Sex_Name
1 Male
2 Female

and

t_names

name_ID name_name sex_id
1 jon 1
2 jason 1
3 Sue 2
4 Bill 1
5 Sally 2

How can I have my results show like this.

Male Jon,Jason,Bill
Female Sue,Sally

I have limited experience with pivot tables but I assume this is the
way to
go......thanks in advance for ahy help.


--
------------------------------------------------------
"A comet is, of course, frozen bodies of ice and dust formed over 4.6
billion years ago---or created 6,000 years ago, depending on whether
or not
you're wrong."
---Jon Stewart




 




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


All times are GMT +1. The time now is 10:47 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.