• how about something like this:

    set ANSI_NULLS ON

    set QUOTED_IDENTIFIER ON

    go

    ALTER PROC [dbo].[bsp_intranet_product_search]

    @ProductIdNVARCHAR(100),

    @ProductDescription NVARCHAR(300)

    AS

    SELECT DISTINCT TOP 100 ProductId, ProductDescription, CrossReference,

    ISNULL(CONVERT(VARCHAR,SUM(QuantityOutstanding)),'0') AS Quantity,

    '£' + CONVERT (VARCHAR(12),StandardPrice,1) AS StandardPrice

    FROM Products

    LEFT OUTER JOIN dbo.Inventory ON dbo.Inventory.Product= dbo.Products.Product

    WHERE (IsNull(RTrim(@ProductId), '') = '' OR [ProductId] LIKE '%' + RTrim(@ProductId) + '%')

    AND (IsNull(RTrim(@ProductDescription), '') = '' OR [ProductDescription] LIKE '%' + RTrim(@ProductDescription) + '%')

    GROUP BY Products.ProductId, Products.ProductDescription, Products.CrossReference, Products.StandardPrice