| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Query to combine two 'many:one' tables
Hallo Jon !
Here is the answer to your question:
SELECT CL.ClientID,CT.ClientType,dbo.fn_Myfunc(ClientID) as Cases
FROM
(
SELECT DISTINCT ClientID,CLientTypeID FROM tblClients
)AS CL
ClientID ClientType Cases ----------- -------------------------------------------------- ------------- ----------------- 1 Person 1,2,3 2 Person 4,5 3 Company 6 4 Company 7,8,9,10,11 5 Company NULL 6 Person 12
(6 row(s) affected)
HTH, Jens Süßmeyer. Received on Mon Sep 01 2003 - 01:05:00 CDT
![]() |
![]() |