General information
Forum:
Microsoft SQL Server
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only