Skip to content
Advertisement

Tag: sql-server-2012

Extract first argue from column with T-SQL

I need to extract the first argument: “PATHTOPACKAGE” from the string below: which is a column stored at SQL Server msdb.sysjobsteps.command Is there a way to do it by using Regex or Spliting it by blank spaces? Answer Based on the one example we have, a couple of CHARINDEXs a little bit of simple string manipulation gets the job done:

Advertisement