SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Replacing text within a single column
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

rabisco
Starting Member

8 Posts

Posted - 05/07/2012 :  16:10:02  Show Profile  Reply with Quote
I have the following scenario.

I have a column in a database which can have one or more paragraphs <P></P>

I have the following data...


DECLARE @Text Nvarchar(250)
DECLARE @StartPoint int
DECLARE @EndPoint int

SET @Text = 'Paragraph One <P>product1=1234 prodcut2=5678</p>Paragraph Two <P>product1=1234</P>Paragraph Three<P>prodcut2=5678</P>Paragraph Four <P>prodcut2=1111</P>'




The end result is such that each paragraph should have product1 and product2.

Paragraphs which currently have product1 and product2 should not be processed.




visakh16
Very Important crosS Applying yaK Herder

India
47099 Posts

Posted - 05/07/2012 :  16:22:33  Show Profile  Reply with Quote
so are you looking at changing table data itself or just do the replace while retriving?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000