Getting Started with Adobe After Effects - Part 6: Motion Blur
Ask
Ask questions, discuss or help others by answering
Related Posts · View All
SQL Server 142
TSQL 76
SSRS 70
SSIS 66
XML 54

Top Categories · View All
SQL Server 142
TSQL 76
SSRS 70
SSIS 66
XML 54

Replace a Word in SQL Server 2008

Jun 1 2011 12:00AM by Karthikeyan G   

I want a function which would replace a text 'Cost of 12 centimeter scale is $15, is of 40cents.' to 'Cost of 12 centimeter scale is £15, is of 40pence.'

In this i want to replace Cent - Pence and $ - £ can u plz give solution for this,

Submitted under: Microsoft SQL Server ·  ·  ·  · 


Karthikeyan G
1557 · 0% · 12

1 Replies

  • Karthi, you can create a function like below...and u can use that as i showed i below.

    create function fnreplaceText
    (
        @str varchar(max)
    ) returns varchar(max)
    as
    begin
        return replace(replace(@str,'Cent','Pence'),'$','£')
    end
    
    GO
    
    select dbo.fnreplaceText( 'Cost of 12 centimeter scale is $15, is of 40cents.')
    
    commented on Jun 1 2011 12:01PM
    Ramireddy
    2 · 41% · 12972

Your Reply


Sign Up or Login to post a comment.

    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]