How to group data and display some of the details in a column?

S

Shirley

Hi,

I have a table in Access 2000,
I fail to find any method by using SQL to display the output like the
following example (group the related weekdays in a column),
Could anyone teach me how to solve it?
Thx!


Records in Table :

Mary Mon 12
John Wed 10
Tom Thu 11
John Sat 13
Mary Tue 20
Jonn Fri 14
Mary Mon 10


Expected Result: (3 columns)

Mary "Mon,Tue" 42
John "Wed,Sat,Fri" 37
Tom "Thu" 11



-Marshmallow
 
M

MGFoster

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

There isn't a JET (Access) built-in function that will allow an SQL
statement to put multiple values from one column into one record's
output column. There is a VBA function that you can call from the query
that will do this. See this web site:

Return a concatenated list of sub-record values:

http://www.mvps.org/access/modules/mdl0004.htm

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQI65/YechKqOuFEgEQIGygCg89upvJMIimi95Yq6Z54sRTSY+5AAnjKf
1wh0BHRsLbogULBIKzjPs5lg
=0/UY
-----END PGP SIGNATURE-----
 

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