Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 another query problem

Author  Topic 

Rita Bhatnagar
Posting Yak Master

172 Posts

Posted - 2001-04-09 : 13:22:05
SELECT qryPLAllSub.*
FROM qryPLAllSub
Case when @prmCOID <> '*' then qryPLAllSub.CompanyEntityId=(select * from #Temp)
Else qryPLAllSub.CompanyEntityId=(select CompanyEntityID from qryPLAllSub)
ORDER BY qryPLAllSub.EntityId, qryPLAllSub.AdmissionDate DESC;

@prmCOID is a string like ',4,7,'
I extract 4 and 7 and put them into #Temp
I know it is not right .can somebody help me out.Thanks in advance.
Rita

   

- Advertisement -