remove space on sql job name

Posted on 2014-02-16
Medium Priority
Last Modified: 2014-02-17

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

select distinct name from msdb..sysjobs

Question by:bibi92
LVL 19

Expert Comment

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

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

Accepted Solution

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

Featured Post

Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

627 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