SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Extracting a String From Between Two Delimiting Characters


Extracting a String From Between Two Delimiting Characters

Author
Message
Lashams
Lashams
SSC-Enthusiastic
SSC-Enthusiastic (116 reputation)SSC-Enthusiastic (116 reputation)SSC-Enthusiastic (116 reputation)SSC-Enthusiastic (116 reputation)SSC-Enthusiastic (116 reputation)SSC-Enthusiastic (116 reputation)SSC-Enthusiastic (116 reputation)SSC-Enthusiastic (116 reputation)

Group: General Forum Members
Points: 116 Visits: 48
Comments posted to this topic are about the content posted at http://www.sqlservercent



Frances L
Frances L
Mr or Mrs. 500
Mr or Mrs. 500 (563 reputation)Mr or Mrs. 500 (563 reputation)Mr or Mrs. 500 (563 reputation)Mr or Mrs. 500 (563 reputation)Mr or Mrs. 500 (563 reputation)Mr or Mrs. 500 (563 reputation)Mr or Mrs. 500 (563 reputation)Mr or Mrs. 500 (563 reputation)

Group: General Forum Members
Points: 563 Visits: 299

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


Frances L
Frances L
Mr or Mrs. 500
Mr or Mrs. 500 (563 reputation)Mr or Mrs. 500 (563 reputation)Mr or Mrs. 500 (563 reputation)Mr or Mrs. 500 (563 reputation)Mr or Mrs. 500 (563 reputation)Mr or Mrs. 500 (563 reputation)Mr or Mrs. 500 (563 reputation)Mr or Mrs. 500 (563 reputation)

Group: General Forum Members
Points: 563 Visits: 299

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


Stock
Stock
Valued Member
Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)

Group: General Forum Members
Points: 55 Visits: 61
Try "Substring"
Varsha Chandra
Varsha Chandra
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search