Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Concatenation in a group query

Status
Not open for further replies.

jpadie

Technical User
Nov 24, 2003
10,094
FR
Hi

i have a query that is not working quite the way i would like yet...

the query looks like this:

Code:
SELECT 
  [Project Details].strCustomer, 
  Times.datDate, 
  [Project Details].strProjectName, 
  Sum(Times.dblHours) AS SumOfdblHours, 
  Times.memDescription
FROM 
  [User Details] 
  INNER JOIN (  [Project Details] 
                INNER JOIN 
                  Times 
                  ON 
                  [Project Details].lngProjectID = Times.lngProjectID
             ) 
  ON 
    [User Details].lngUserID = Times.lngUserID

GROUP BY 
  [Project Details].strCustomer, 
  Times.datDate, 
  [Project Details].strProjectName;

this is (as you may be able to tell) a timesheet application. The query returns exactly what I want if I do not retrieve the Times.memDescription field. However what I need is the query to return a string in this field that is the concatenation of each of the values in this field within the gruop (sort of like a sum for strings).

the database is currently in access but it is being ported to mysql (hence the slightly odd notation)

Is this possible and if yes can anyone supply a pointer as to how to do this?
 
woops, i've asked the question the wrong way around.
thinking about the issue again, i'm after an access equivalent of group_concat.

but i'm posting in the wrong forum.

sorry...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top