Please excuse my ignorance but I'm new to T-SQL and am having a problem. I have a proc that I want to send three parameters too, but only have it search on the paramters if they are valid (above 0). In the following example I am filtering on County, Town and Type. But only want to filter if the value of the parameter is included. So if they only pass in county, then thats all I want to filter on.Any ideas?CREATE PROCEDURE FeatureBusinessByTown @County int, @Town int, @Type int ASSelect Top 5 BusinessIDFROM SELECT TOP 5 fbisBusinessLookup.BusinessID FROM fbisBusinessLookup INNER JOIN DIRECTORY ON fbisBusinessLookup.BusinessID = directory.[id] WHERE IF (@county > 0) THEN "(fbisBusinessLookup.countyid = @County)"IF (@Town > 0) THEN " AND fbisBusinessLookup.TownID = @Town"IF (@Type>0) THEN " AND fbisBusinessLookup.TypeID = @Type" ORDER BY NEWID()) DERIVEDTBLGO