Forum Replies Created

Viewing post 1 (of 2 total)

  • RE: Replace multiple characters based on table values

    David Burrows (12/12/2014)


    Solution for additional maths

    SELECT (SELECT ISNULL(CAST(t.Total as varchar(10)),f.Item)

    FROM master.dbo.DelimitedSplit8K(

    REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(@formula,'+','|+|'),'-','|-|'),'*','|*|'),'/','|/|'),'(','|(|'),')','|)|')

    ,'|') f

    LEFT JOIN Totals t ON t.RowNo = f.Item

    ORDER BY ItemNumber

    FOR XML PATH (''))

    Thanks a lot David, works wonderfully even...

Viewing post 1 (of 2 total)