i try to implement filter, i am passing parameter from from my code
following string i am sending to store procedure
and tsn.SurveyorName=''Keval Kakdiya''
following is my store procedure
procedure
(filterText varchar(8000)
SELECT DISTINCT tsd.State AS State, IFNULL(tsn.SurveyorName,0) SurveyorName,
IFNULL(tni.NoOfInt, 0) NoOfInt, IFNULL(tsr.SampleReceived, 0) SampleReceived,
IFNULL(tce.CancelledEntries, 0) CancelledEntries,
IFNULL(ta.Approved, 0) Approved, IFNULL(td.DisApproved, 0) DisApproved
FROM tblsurveyordistrict tsd
LEFT JOIN tblNoOfInt tni ON tsd.State = tni.State
LEFT JOIN tblSampleReceived tsr ON tsd.State = tsr.State
LEFT JOIN tblSurveyorName tsn ON tsd.State = tsn.State
LEFT JOIN tblCancelledEntries tce ON tsd.State = tce.State
LEFT JOIN tblApproved ta ON tsd.State = ta.State
LEFT JOIN tblDisapproved td ON tsd.State = td.State
where 1=1 ' , filterText, '
ORDER BY tsd.State;
i am not getting any record same above string i am pasing like this it working
SELECT DISTINCT tsd.State AS State, IFNULL(tsn.SurveyorName,0) SurveyorName,
IFNULL(tni.NoOfInt, 0) NoOfInt, IFNULL(tsr.SampleReceived, 0) SampleReceived,
IFNULL(tce.CancelledEntries, 0) CancelledEntries,
IFNULL(ta.Approved, 0) Approved, IFNULL(td.DisApproved, 0) DisApproved
FROM tblsurveyordistrict tsd
LEFT JOIN tblNoOfInt tni ON tsd.State = tni.State
LEFT JOIN tblSampleReceived tsr ON tsd.State = tsr.State
LEFT JOIN tblSurveyorName tsn ON tsd.State = tsn.State
LEFT JOIN tblCancelledEntries tce ON tsd.State = tce.State
LEFT JOIN tblApproved ta ON tsd.State = ta.State
LEFT JOIN tblDisapproved td ON tsd.State = td.State
where 1=1 and tsn.SurveyorName=''Keval Kakdiya''
ORDER BY tsd.State;
can anyone help me
What I have tried:
i tried everything but its not working