Hi

I am using a stored procedure to search a single table with
"COALESCE(@param,param)" but the NULL default value is being ignored.

I think the test item in the MM stored procedure code is causing the value to
never be NULL? therefore displaying no results instead of all results within
the field if no item from a list is specified.

Any suggestions would be appreciated.

CODE BELOW:

CREATE PROCEDURE ******.p_******

@param varchar (255) = NULL

AS

SET NOCOUNT ON

SELECT*

FROM dbo.t_*******

WHERE COALESCE(@param,param) AND field2 = 'LIVE'

ORDER BY field3 DESC
GO


With standard MM dataset.


Cheers
J