I have some checkbox(Condition Filter) which user can tick select filter condition
for example:
CheckBox 1 : OrderNumber
CheckBox 2 : Driver
CheckBox 3 : Code
...
and pass into stored procedure - some thing like this :
ALTER PROCEDURE [dbo].[DailyBatchSummaryReport_NoGroup]
@FromDatePara Datetime,
@ToDatePara Datetime,
@SeleRecipe nvarchar(max),
@SeleOrder nvarchar(max),
@SeleCustomer nvarchar(max),
@SeleSite nvarchar(max),
@SeleTruck nvarchar(max),
@SeleDriver nvarchar(max),
AS
BEGIN
// Stuck at this point
I want to write one procedure can handle muti-case of user selection, I have idea with string builder and pass in to WHERE clause, but SQLSERVER not accept this (It accept boolean parameter)
could someone help me. Thanks you.