Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Just again looking at some log from an oracle script, where the developer intended to comment out some part not to add documentation.

I don't want that a script containing code like this

/*
select getWochentag(SYSDATE) from DUAL;
select
    getWochentag (SYSDATE    ) || isWeekend (SYSDATE    ), 
    getWochentag (SYSDATE + 1) || isWeekend (SYSDATE + 1), 
    getWochentag (SYSDATE + 2) || isWeekend (SYSDATE + 2), 
    getWochentag (SYSDATE + 3) || isWeekend (SYSDATE + 3), 
    getWochentag (SYSDATE + 4) || isWeekend (SYSDATE + 4), 
    getWochentag (SYSDATE + 5) || isWeekend (SYSDATE + 5), 
    getWochentag (SYSDATE + 6) || isWeekend (SYSDATE + 6)
FROM DUAL;

*/

produces output like

DOC>select getWochentag(SYSDATE) from DUAL;
DOC>select
DOC>        getWochentag (SYSDATE    ) || isWeekend (SYSDATE    ),
DOC>        getWochentag (SYSDATE + 1) || isWeekend (SYSDATE + 1),
DOC>        getWochentag (SYSDATE + 2) || isWeekend (SYSDATE + 2),
DOC>        getWochentag (SYSDATE + 3) || isWeekend (SYSDATE + 3),
DOC>        getWochentag (SYSDATE + 4) || isWeekend (SYSDATE + 4),
DOC>        getWochentag (SYSDATE + 5) || isWeekend (SYSDATE + 5),
DOC>        getWochentag (SYSDATE + 6) || isWeekend (SYSDATE + 6)
DOC>FROM DUAL;
DOC>
DOC>*/

I just want to see nothing in the log. (Only empty logs are good logs)

share|improve this question

2 Answers 2

up vote 3 down vote accepted

SET DOC[UMENT] OFF

At least in 9i. I can't make these comments display at all in 10g, so I think they've made this option even more obsolete - it still controls explicit DOC blocks, but apparently not comment blocks...

share|improve this answer

I wanted to suppress comments from login.sql

While using "--" style comments are not displayed, rem and /* */ are displayed!

Environment: Using SQL*Plus: Release 9.0.1.3.0

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.