String in PL/SQL is enclosed in '. So when you want put ' in string you must double it.
'' - empty string
'''' - string with one '
If you use dbms_scheduler package to define job it up to you put connrect string as parameter.
If you use some tool with GUI it probably do it for you automaticly.
Thank you for your reply, but I don't know if you got the question. The thing is that when we run that anonymous block in any Client like TOAD, or SQL Developer, it works fine. Once we paste the same code to PL/SQL Block of Job Scheduler in Enterprise Manager, after saving it adds the single quote to all the strings.
Originally it's like this
SELECT 'Database '||b.name ||', disk '||a.name||', used % '....
After saving the job in Enterprise Manager it changes to this:
SELECT ''Database ''||b.name ||'', disk ''||a.name||'', used % '' ...
Yes, we have exactly the same problem. As a work around, we created a procedure and then scheduled the job to kick off the procedure instead of using an anonymous PL/SQL block. We've discovered this issue on all of our environments, which is forcing us to use this workaround for many of our new and existing jobs that need to be modified.