Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Extracting a String From Between Two Delimiting Characters Expand / Collapse
Author
Message
Posted Wednesday, June 09, 2004 1:52 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, August 01, 2011 2:05 PM
Points: 32, Visits: 47
Comments posted to this topic are about the content posted at http://www.sqlservercent


Post #120181
Posted Thursday, February 16, 2006 12:43 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Sunday, September 18, 2011 6:11 PM
Points: 355, Visits: 299

I got error from 'SUSTRING' is not a recognized function name.

Post #259167
Posted Thursday, February 16, 2006 12:43 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Sunday, September 18, 2011 6:11 PM
Points: 355, Visits: 299

I got error from 'SUSTRING' is not a recognized function name.

Post #259168
Posted Tuesday, April 04, 2006 2:54 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, June 08, 2010 3:11 AM
Points: 49, Visits: 61
Try "Substring"
Post #270773
Posted Thursday, February 04, 2010 10:52 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, February 04, 2010 11:13 PM
Points: 1, Visits: 3
Hi, I have a similar issue where i need to extract the data from the xml string which is present in a particular column. I need to get the result set in a way that it should pull everything between <credittaker> </credittaker> from the whole xml string. the length between this is not fixed.

For e.g. I have a table 'EventHistory' and column 'XMLDataValue' and column data is like given below:
<event><credittaker>HAROLD D JORDAN</credittaker><primarymonitoringparty>Russell Pleasants</primarymonitoringparty><monitoringentity></monitoringentity><primarygci>510211006</primarygci><status>Pending Initial Setup</status><active>A</active><schedulecomplete>N</schedulecomplete><author>LEAP</author><eventdatetime>Jul 4 2002 8:48AM </eventdatetime><EventCode>Credit Taker Setup Incomplete</EventCode></event>

<event><credittaker>JORDAN HOLMAN LUMBER CO INC</credittaker><primarymonitoringparty>Susan Jones</primarymonitoringparty><monitoringentity></monitoringentity><primarygci>510156755</primarygci><status>Pending Initial Setup</status><active>A</active><schedulecomplete>N</schedulecomplete><author>LEAP</author><eventdatetime>Jul 4 2002 8:48AM </eventdatetime><EventCode>Credit Taker Setup Incomplete</EventCode></event>

The result set should give me
HAROLD D JORDAN
JORDAN HOLMAN LUMBER CO INC

from the above xml string.
Post #860180
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse