Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Query help needed
Message
From
24/01/2006 20:59:01
Alvin Lourdes
Children and Youth Services Cluster
Toronto, Ontario, Canada
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
Query help needed
Miscellaneous
Thread ID:
01089988
Message ID:
01089988
Views:
71
I have 3 tables

Users
Customerid - guid
userid - varchar

customertoworker
customerid - FK
workerid - FK


extract
customerid - guid

data layout

extract
EACFF367-8E73-4C4C-A9A7-036A0D7E57AB

customertoworker
EACFF367-8E73-4C4C-A9A7-036A0D7E57AB, 90ED4230-2711-4019-A2AD-071D52891BBF
EACFF367-8E73-4C4C-A9A7-036A0D7E57AB, 873762AB-34BD-455B-83B2-137645BE3331

users
EACFF367-8E73-4C4C-A9A7-036A0D7E57AB , RAINMAN
90ED4230-2711-4019-A2AD-071D52891BBF , BOB
873762AB-34BD-455B-83B2-137645BE3331 , JAMES

I want the data to appear in 1 row. I want to know the workers that all users in the extract have in 1 row.

ex
RAINMAN, BOB, JAMES

select x.userid, z.userid,x.customerid
from cdtextractactivemlm x
inner join customertoworker y
on x.customerid = y.customerid
inner join useridentifier z
on z.customerid = y.workerid
order by y.customerid

can someone help me out with this one.

Thanks in advance.
Reply
Map
View

Click here to load this message in the networking platform