Josh Harp
  • Posts: 12
  • Joined: 10/2/2017
I'd love to see a feature where you can select text, and encapsulate it as a string.
This is how it'd look:
Take this code
SELECT *
FROM msdb..sysjobs
WHERE NAME LIKE '%item%'
	AND job_id NOT IN (
		SELECT DISTINCT sj.job_id
		FROM msdb.dbo.sysjobactivity AS sja
		INNER JOIN msdb.dbo.sysjobs AS sj ON sja.job_id = sj.job_id
		WHERE sja.start_execution_date IS NOT NULL
			AND sja.stop_execution_date IS NULL
		)


Replace it with this:
'SELECT *
FROM msdb..sysjobs
WHERE NAME LIKE ''%item%''
	AND job_id NOT IN (
		SELECT DISTINCT sj.job_id
		FROM msdb.dbo.sysjobactivity AS sja
		INNER JOIN msdb.dbo.sysjobs AS sj ON sja.job_id = sj.job_id
		WHERE sja.start_execution_date IS NOT NULL
			AND sja.stop_execution_date IS NULL
		)'
  • You cannot post new topics in this forum.
  • You cannot reply to topics in this forum.
  • You cannot delete your posts in this forum.
  • You cannot edit your posts in this forum.
  • You cannot create polls in this forum.
  • You cannot vote in polls in this forum.