User632751675 posted
hi,
I have a stored procedure that uses an optional parameter- it can be null or it can be a comma-delimited string.
I first set the parameter to null ( @param varchar(100) = null; )
Then I check the parameter : where isnull(order,'') (select value from fn_split(@param,','))
when I have one value or more, the procedure returns records. when I don't have anything in that parameter, nothing returns.
I have another similar parameter, but it is much simpler and is set with some known values such that if the user does not select it, it returns all records.
Should I try to use a different 'where' clause depending on the value of the parameter instead?
thanks
I checked for null values in the where clause - and it seems to be working - sorry I posted too soon.