i am facing a slite problem in sql server 2008 and here is the situation
IF @PatCntFamNbr is not null
BEGIN
select t.Cntid AS Center , t.PatFName AS FirstName , t.PatMName AS MiddleName , t.PatLName AS LastName
from tblpatient t INNER JOIN TblPatientCentres p
ON p.PatID_fk = t.PatId_PK
where p.CentreID_fk=@cntid and @patid in (select patid_fk from tblpatientcentres where cntfammbnbr=@cntfammbnbr)
END
my major problem is that this must show lots of names that belongs to the same family and the variable @patis is accepting only one variable and this is not allowing the procedure to work properly
i will be really thankful for any help