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
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment