How to apply the parameter in the first dataset???
This is what I tried.
SELECT * FROM
(SELECT DISTINCT
a.DiseId,
n1.LastName,
n1.FirstName,
n1.MiddleName,
...............................
FROM Table1 a
----------) AS Entity
WHERE Entity.FirstName + ' ' + lastName = @FullNameParam
When I created this query. "Define Query Parameters" window was displaying for the @FullNameParam.
I removed a "Order By" from the original query but still no data was showing in the table.