This question is related to both c# and SQL Server.
I want to figure out how to do a custom search.
I have three tables
Customer
CusId, Name, Telephone
Employee
EmpId, Name, Job
Appointment
AppId, Date, EmpId, CusId
My C# form has three checkboxes. I want to find the data according to those checked values.
Ex: when customer,employee,app check boxes have selected, I want to find data on depending on all those three values.
When only two or one is selected I want to search depending on those selection. Here there will be total 6 combinations.
How to write a query to get correct result when I pass those values as parameters to a stored procedure.
Do I have to write 6 stored procedures to get the result?
Are there any methods to do this easily?
Please help me to fix this matter. Thanks in advance.