[Solved] NULL values in multivalue parameter


Finally found the answer:

[dbo].[USP_GetProjectPhase] @PurchaseOrder INT
AS

SELECT      -1 AS 'ProjectPhaseID'
            ,'No Filter' AS 'Phase'
UNION
SELECT       pp.ProjectPhaseID
            ,pp.Phase  

FROM        ProjectPhase pp
WHERE       @PurchaseOrder = pp.PurchaseOrderId 

In my query I changed the WHERE clause to:

WHERE (reg.ProjectPhaseId IN (SELECT Value FROM fnLocal_CmnParseList(@Phase,',')) OR @Phase="-1")

1

solved NULL values in multivalue parameter