This is the actual sql
This is actually the sql.
SELECT c.Id , c.CaseId , c.EmpId, c.AlienId, c.FirmAddressId, d.UserId,
d.FirstNm , d.MiddleNm, d.LastNm , c.FirmId, c.MainCase ,
b.MaidenNm,e.Processcatalog,
c.archived, d.NiStatus, d.ExpiresOn FROM Cases c
INNER JOIN Users as d ON c.AlienID = d.userid inner join users as b ON
c.empid = b.userid
INNER JOIN Processcatalog as e ON c.Process = e.ProcesscatalogID
WHERE c.EmpID=MMColParam and d.FirstNm LIKE 'MMColParam3%' and d.LastNm LIKE
'MMColParam4%' AND c.archived =0 and d.Usertype = 'Contact'
What I need is to select only those where d.userid are different from one
another. How can I do this ?
Aleks
[quoted text, click to view] "Aleks" <arkark2004@hotmail.com> wrote in message
news:u22mcVGeFHA.2700@tk2msftngp13.phx.gbl...
> No,
>
> I only need the clients, but I need to filter out by a column that is in
> the cases column, but I don't want them repeated if there are multiple
> cases.
>
> A
>
> "Jens Süßmeyer" <Jens@Remove_this_For_Contacting.sqlserver2005.de> wrote
> in message news:eyoeURDeFHA.612@TK2MSFTNGP12.phx.gbl...
>> Of you got two sources (cases and customers) you haveto qualify the
>> results. * will show all columns of the query and the two table, so
>> placing the Cases.
>> if you want only the cases solves the problem (or name the indivual
>> columns like Select Cases.caseID,Cases.SOmeothercolumn...)
>>
>> --
>> HTH, Jens Suessmeyer.
>>
>> ---
>>
http://www.sqlserver2005.de >> ---
>> "Aleks" <arkark2004@hotmail.com> schrieb im Newsbeitrag
>> news:eYl4h4CeFHA.2420@TK2MSFTNGP12.phx.gbl...
>>>I have an sql to select 'customers', something like
>>>
>>> Select * from clients
>>> inner join cases on clients.id = cases.clientid
>>>
>>> The client may have multiple cases and if I run the query like that I
>>> may get the same client multiple times, how can I only display the
>>> client once when there are multiple results.
>>>
>>> The have an ID which is unique so that might help .. help is
>>> appreciated.
>>>
>>> Aleks
>>>
>>
>>
>
>