I have a customer list and I filter them by three criterias. The first is YEAR , the second is Company Name and the third is PRODUCT NAME. The first two parameters(Year and Company Name) must be compulsory. The last parameter(PRODUCT NAME) must be optional. My Dataset Query is below..
SELECT * FROM Customer_List WHERE (YEAR(date) = @paramYEAR) AND (Company_NAME= @paramMitarbeiter) AND(PRODUCT LIKE '%' + @paramKommentar + '%') ORDER BY datum
When I make a search without Product Name then it shows anything.But I ticked Allow blank value forProduct Name.
What do u advise me to make correct search by choosing Year and Company Name. Additionally, Product name must be optional.
The year and company name must be entered and the product name must be optional.
KAdir