Scott,

That will not work in SQL.

SQL deals with sets of data, you are trying to aggregate a set of data into 
a single column.  The only way you will see such results is if you try to 
denormalize your tables or if you write a stored procedure which takes the 
result set that you don't want (the first one in your email) and loop 
through it to generate the second result set.  If that's your plan, why not 
use CFOUTPUT with the group attribute on the user column?

-dhs

At 10:33 AM 8/9/01 -0600, you wrote:
>Hey gang -
>
>I'm digging around in the Books Online bit for SQL7 and can't seem to figure
>this out...
>
>I've got a query, with about four tables it, all joined. No biggie. One of
>the fields causes the recordset to be more-than-one - one of the tables is a
>"user" table, but on the other end of the join is a "permissions" sort of
>table, with a one-to-many relationship.
>
>What I'm trying to do is get the permissions-related field's contents to
>come back as a single record, so instead of
>
>User   Perm
>1       1
>1       2
>1       3
>
>I get
>
>User    Perm
>1       1,2,3
>
>Is there SQL syntax to do this?
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to