Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Query help needed
Message
De
24/01/2006 20:59:01
Alvin Lourdes
Children and Youth Services Cluster
Toronto, Ontario, Canada
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
Query help needed
Divers
Thread ID:
01089988
Message ID:
01089988
Vues:
70
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.
Répondre
Fil
Voir

Click here to load this message in the networking platform