• Another approach that uses an ITVF, only it uses the EXCEPT set operator instead:

    if object_id('dbo.NotPurchased', 'if') is not null drop function dbo.NotPurchased;

    go

    CREATE FUNCTION dbo.NotPurchased(@UserID Nchar(10)) RETURNS TABLE WITH SCHEMABINDING

    AS

    RETURN (

    WITH cteUnpurchased AS (

    SELECT ProdID

    FROM dbo.Prod_T

    EXCEPT

    SELECT ProdID

    FROM dbo.User_Prod_T

    WHERE UserID = @user-id

    )

    SELECT p.ProdID, p.ProdTitle, p.ProdType

    FROM dbo.Prod_T p

    CROSS APPLY cteUnpurchased u

    WHERE p.ProdID = u.ProdID

    );

    go

    SELECT *

    FROM dbo.NotPurchased(N'001') np

    ORDER BY ProdID;

    You can modify it to include only products of specific types or add another parameter to limit the type. You may not be able to do it with a view because of the parameter, but you can come close with a function. Jeff has already offered the word of caution - Avoid the dreaded MTVF.