search engine
I've having a small problem. I have a search engine that searches a database on sqlserver based on certain criteria. I would like to code the stored procedure so that the database can be searched with all, some, or none of the criteria and have only info for that criteria populate. This is what the code looks like now...
(
@RecID varchar(15),
@LName varchar(50),
@Business varchar(100),
@TaxID varchar(20),
@Class varchar(5),
@ChkNum varchar(25)
)
AS
Select App.vchFWRecID, App.vchLast, App.vchFirst, Bus.vchBusinessName, Bus.vchCity,
Bus.vchFWClass, Bus.vchSalesID, Pay.vchCheckNum
From tblFWApplicant App
inner join tblFWBusiness Bus on App.vchFWRecID = Bus.vchFWRecID
inner join tblFWPayment Pay on App.vchFWRecID = Pay.vchFWRecID
where App.vchFWRecID like @RecID or App.vchlast like @LName or bus.vchFWClass like @Class
or bus.vchBusinessName like @Business or bus.vchSalesID like @TaxID or pay.vchCheckNum like @ChkNum
order by App.vchFirst asc
|