Grouping fields...

Results 1 to 2 of 2

Thread: Grouping fields...

  1. #1
    Join Date
    Dec 1969

    Default Grouping fields...

    Hi<BR><BR>I&#039;d need help with the following problem.<BR><BR>I have created a database of document names and paths, but I needed some documents to fit in more than one category. So I created 3 tables :<BR>- docs (docid as primary key, doctitle as text, docpath as memo)<BR>- cats (catid as primary key, catname as text)<BR>- docscats (2 fields : docid and catid joined with their relatives in "docs" and "cats")<BR><BR>Now I need to find an SQL query (and/or a piece of code to format it) that is not going to repeat the document id, title and path for each category.<BR>That is to say, grouping each field by document id, title and path so as the categories appear separed by a coma or another symbol.<BR><BR>I&#039;m not an SQL master so I tried the GROUP BY clause, but it returns an error ("You tried to run a query which does not comprise the expression &#039;doctitle&#039; as a part of the aggregate function").<BR><BR>Thanks for any help.<BR><BR>CCM

  2. #2
    Join Date
    Dec 1969

    Default RE: Grouping fields...

    how about this:<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts