Simple string parsing using TSql using the SPLIT and CharIndex functions
Here I need to extract the data AFTER the $ in the input.
--Split out instance Name
SELECT SUBSTRING('MSSQL$SQLDBT01',CHARINDEX('$','MSSQL$SQLDBT01')+1,len('MSSQL$SQLDBT01'))
Here is the output
------------
SQLDBT01
Showing posts with label SPLIT. Show all posts
Showing posts with label SPLIT. Show all posts
Monday, July 14, 2008
Subscribe to:
Posts (Atom)