Re: Query returning a list for a JOIN

2010-07-07 Thread Rick Root
Check out transact-SQL's COALESCE() function. I use this in a case to return a comma-separated list of roles for each user in a database... ie, my userRoles table looks like this CREATE TABLE [dbo].[userRoles] ( [userid] [char](10) NOT NULL, [roleid] [smallint] NOT NULL,

Query returning a list for a JOIN

2010-07-06 Thread Claude Schnéegans
Hi, There is something I cannot figure a simple way of doing it, either in SQL or in CF. JOINS in SQl are relly handful, but sometimes, they can generate qute big queries for nothing. Suppose I have this: SELECT table1.many columns, table2.justOneColumn FROM table1 LEFT JOIN table2 ON

Re: Query returning a list for a JOIN

2010-07-06 Thread Mike Chabot
You can create comma lists in T-SQL, if that is what you want to do. T-SQL is the Microsoft-flavor of SQL. I'm not sure if that is what you are using. So instead of 1 A 1 B 2 A you would get 1 A,B 2 A -Mike Chabot On Tue, Jul 6, 2010 at 1:33 PM, wrote: Hi, There is something I cannot

Re: Query returning a list for a JOIN

2010-07-06 Thread Claude Schnéegans
you would get Exactly, thanks, I'll see If I can migrate the database to SQL-Server. ~| Order the Adobe Coldfusion Anthology now!