?
Solved

remove space on sql job name

Posted on 2014-02-16
2
Medium Priority
?
216 Views
Last Modified: 2014-02-17
Hello,

How can I modify the following query for remove space in a job name ?

select distinct name from msdb..sysjobs

Thanks
0
Comment
Question by:bibi92
2 Comments
 
LVL 19

Expert Comment

by:regmigrant
ID: 39863595
select distinct substitute(name," ","") from msdb..sysjobs

syntax is SUBSTITUTE(<text>, <old_text>, <new_text>, <instance_num>)
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 2000 total points
ID: 39863859
Is this what you mean:
SELECT DISTINCT
        REPLACE(name, ' ', '')
FROM    msdb..sysjobs
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question