Hi Friends,
I have a form with various fields. My Idea is to filter a table depending on those values but some of them are not required. I have a SP built using LIKE in order to do the search so when one of the textboxes is left empty it will not filter by that particular field.
This is the SP:
ALTER PROCEDURE [dbo].[sp_SearchPatient]
@FName varchar(20) = '',
@LName varchar(20) = ''
AS
BEGIN
SELECT PCT_Code,
PCT_FirstName,
PCT_LastName,
PCT_DOB
FROM dbo.tb_Pacients
WHERE PCT_FirstName LIKE '%' + ISNULL(@FName, '') + Go to the complete details ...