digitallyskilled
IS-IT--Management
I need to retrieve text from a field like this
<Name> DataIneed </Name>
How can i do this in SQL 2005?
<Name> DataIneed </Name>
How can i do this in SQL 2005?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
DECLARE @mystring VARCHAR(25)
SET @mystring = '<Name> DataIneed </Name>'
SELECT SUBSTRING(@mystring, (PATINDEX('%>%', @mystring)+1),
(PATINDEX('%</%', @mystring))- (PATINDEX('%>%', @mystring)+1))