Tags: below, block, code, completed, database, meani, message, mysql, oofice, oracle, run, sql, supposed
anonymous block completed
When I try to run below code, I am getting message says: anonymous block completed. What is this mean?
I think I supposed see whether 'ths oofice is closed today or 'theoffce is open today'as the output,,, what is worng in this code?
v_day_of_week := To_CHAR(SYSDATE, 'DY');
If(v_day_of_week in ('SAT', 'SUN')) THEN
DBMS_OUTPUT.PUT_LINE('The office is closed today');
DBMS_OUTPUT.PUt_LINE('The office open today');
Leave a comment...
- 6 Comments
- are you running this in TOAD or some program other than SQL Plus?
if you're running in TOAD, you'll have to turn on your DBMS output window in order to see the output.#1; Fri, 22 Feb 2008 16:14:00 GMT
- I am running in Oracle SQL Developer#2; Fri, 22 Feb 2008 16:15:00 GMT
- well, I'm not really familiar with that product, but because you got the completion message there is nothing wrong with your code - you need to figure out how to display the DBMS_output.#3; Fri, 22 Feb 2008 16:16:00 GMT
Don't know about sqldeveloper, but if it is in sql*plus then: SET SERVEROUTPUT ON#4; Fri, 22 Feb 2008 16:17:00 GMT
ur pl/sql query are correct there no error...before u run this query
sql>set serveroutput on
from this command u will be able to see result of ur query.
Oracle DBA#5; Fri, 22 Feb 2008 16:18:00 GMT
- In Oracle SQL Developer, there is a DBMS_OUTPUT-tab in the SQL Worksheet. The left most icon (that text-balloon thing) is a toggle to set serveroutput on and off.
Running (F5 - Run Script) you anonymous block will give you the results as expected.#6; Fri, 22 Feb 2008 16:19:00 GMT