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
)'