Dbms_output.put_line Error Report Unknown Command
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us how to enable dbms_output in sql developer Learn more about Stack Overflow the company Business Learn more about hiring developers
Dbms_output.put_line Not Working In Oracle
or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow
Set Dbms_output On In Sqlplus
Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Print text in Oracle SQL Developer SQL Worksheet
Dbms_output.put_line Not Working In Toad
window up vote 50 down vote favorite 17 I am using Oracle SQL (in SQLDeveloper, using the SQL Worksheet). I would like to print a statement before my select, such as PRINT 'Querying Table1'; SELECT * from Table1; What do I use to Print / show text output? It's not Print, because that gives me the error: Bind Variable Table1 is NOT DECLARED. DBMS_OUTPUT.PUT_LINE is an unknown sql developer dbms_output tab not displaying command. (Obviously, I'm an inexperienced SQLDeveloper and Oracle user. There must be some synonym for Print, but I'm having trouble finding help on it without knowing what it is.) oracle printing oracle-sqldeveloper share|improve this question edited Mar 10 '14 at 15:24 realspirituals 5,92562660 asked Oct 10 '08 at 21:35 thursdaysgeek 3,838164986 add a comment| 6 Answers 6 active oldest votes up vote 97 down vote accepted for simple comments: set serveroutput on format wrapped; begin DBMS_OUTPUT.put_line('simple comment'); end; / -- do something begin DBMS_OUTPUT.put_line('second simple comment'); end; / you should get: anonymous block completed simple comment anonymous block completed second simple comment if you want to print out the results of variables, here's another example: set serveroutput on format wrapped; declare a_comment VARCHAR2(200) :='first comment'; begin DBMS_OUTPUT.put_line(a_comment); end; / -- do something declare a_comment VARCHAR2(200) :='comment'; begin DBMS_OUTPUT.put_line(a_comment || 2); end; your output should be: anonymous block completed first comment anonymous block completed comment2 share|improve this answer edited Oct 26 '12 at 8:54 Community♦ 11 answered Dec 11 '08 at 16:45 Perry Tribolet 1,366117 1 First line set serveroutput on format wraped; should be set serveroutput on format WRAPPED; –geographika Apr 16 '10 at 13:24 Thanks @geographik
November 2001 11:55 Eric Workman Messages: 3Registered: November 2001 Junior Member Hello- When I try to use DBMS_OUTPUT.enable or DBMS_OUTPUT.put_line or DMBS_OUTPUT.[[Anything]] I get the how to view dbms_output in pl sql developer following Error: SP2-0734: unknown command beginning "dbms_outpu..." - rest of line sql developer script output ignored. Its very odd because if I type 'desc dbms_output' I get the information about the package. sqlplus command skipped set serveroutput on Eric ---------------------------------------------------------------------- Report message to a moderator Re: Trouble Using DBMS_OUTPUT [message #101929 is a reply to message #101927] Tue, 27 November 2001 08:41 http://stackoverflow.com/questions/193107/print-text-in-oracle-sql-developer-sql-worksheet-window rachna Messages: 4Registered: November 2000 Junior Member Enclose it in a begin end block. ---------------------------------------------------------------------- Report message to a moderator Re: Trouble Using DBMS_OUTPUT [message #102019 is a reply to message #101927] Mon, 14 January 2002 02:40 Thierry Maingourd Messages: 1Registered: January 2002 Junior Member It's necessary to indicate SET SERVEROUTPUT ON in http://www.orafaq.com/forum/t/38633/ SQL*PLUS environment before using this fonctions. Report message to a moderator Previous Topic: Re: Coolgen FAQ Next Topic: Re: The Network Adapter could not establish the connection Goto Forum: - SQL & PL/SQLSQL & PL/SQLClient Tools- RDBMS ServerServer AdministrationBackup & RecoveryPerformance TuningSecurityNetworking and GatewaysEnterprise ManagerServer Utilities- Server OptionsRAC & FailsafeData GuardReplicationStreams & AQSpatialText & interMedia- Developer & ProgrammerApplication Express, ORDS & MOD_PLSQLFormsReports & DiscovererDesignerJDeveloper, Java & XMLWarehouse BuilderPrecompilers, OCI & OCCI- Fusion Middleware & Colab SuiteWeblogic & Application ServerBusiness IntelligenceWebCenter Suite & PortalCollaboration & Content ManagementSOA Suite, BPEL and OWSM- ApplicationsOracle Fusion Apps & E-Business SuitePeopleSoft, JD Edwards & SiebelPrimaveraOther Application Suites- InfrastructureHardwareUnixLinuxWindowsOther Operating Systems- Open SourceProgramming InterfacesMySQL- OtherGeneralTraining & CertificationMarketplaceCommunity HangoutSuggestions & FeedbackTest- Non-English ForumsArabicDutchFrenchGermanJapanesePortugueseRussianSpanish -=] Back to Top [=- [ Syndicate this forum (XML) ] [ ] Current Time: Thu Oct 06 10:20:06 CDT 2016 Total time taken to generate the page: 0.14250 seconds .:: Forum Home :: Blogger Home :: Wiki Home :: Contact :: Privacy ::.
CommunityOracle User Group CommunityTopliners CommunityOTN Speaker BureauJava CommunityError: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not work correctly without it enabled. Please turn JavaScript back on and reload this page. Please enter a title. You can not post a blank message. Please type your https://community.oracle.com/thread/883865?start=15&tstart=0 message and try again. More discussions in PL/SQL and SQL All PlacesDatabaseDatabase Application DevelopmentPL/SQL and http://www.dbforums.com/showthread.php?1668704-Error-on-every-line-! SQL This discussion is archived 1 2 Previous Next 21 Replies Latest reply on Apr 5, 2009 2:28 PM by Hoek Go to original post This content has been marked as final. Show 21 replies 15. Re: A query with row and colum numbers? Walter Fernández Apr 5, 2009 2:15 PM (in response to 693986) Hi, Please post sql developer your errors. For example if you are using PL/SQL Developer and paste the code in a SQL window you will have a lot of errors; in this case you should paste into a command window. Regards, 1 person found this helpful Like Show 0 Likes(0) Actions 16. Re: A query with row and colum numbers? 693986 Apr 5, 2009 2:21 PM (in response to Hoek) There it is: Error starting at line 1 dbms_output.put_line not working in command: SQL> DECLARE Error report: Unknown Command Error starting at line 2 in command: 2 v_sql VARCHAR2(4000); Error report: Unknown Command Error starting at line 3 in command: 3 v_column_name VARCHAR2(30):= 'TARTU'; Error report: Unknown Command Error starting at line 4 in command: 4 v_to VARCHAR2(30):= 'P2RNU'; Error report: Unknown Command Error starting at line 5 in command: 5 v_distance NUMBER; Error report: Unknown Command Error starting at line 6 in command: 6 BEGIN Error report: Unknown Command Error starting at line 7 in command: 7 v_sql := 'SELECT ' || v_column_name || ' FROM SEITSMESTABEL d WHERE d.Linn = ''' || v_to || ''''; Error report: Unknown Command Error starting at line 8 in command: 8 EXECUTE IMMEDIATE v_sql Error report: Unknown Command Error starting at line 9 in command: 9 INTO v_distance; Error report: Unknown Command Error starting at line 10 in command: 10 Error report: Unknown Command Error starting at line 11 in command: 11 dbms_output.put_line(v_distance); Error report: Unknown Command Error starting at line 12 in command: 12 Error report: Unknown Command Error starting at line 13 in command: 13 EXCEPTION Error report: Unknown Command Error starting at line 14 in command: 14 WHEN OTHERS THEN Error report: Unknown Command Error starting at line 15 in command: 15 dbms_output.put_line(SQLERRM); Error report: Unknown Command Erro
check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 9 of 9 Thread: Error on every line?! Tweet Thread Tools Show Printable Version Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 07-28-11,15:05 #1 James_A View Profile View Forum Posts Registered User Join Date Jul 2011 Posts 22 Unanswered: Error on every line?! I wrote a script in MS SQL, and am trying to port it over to Oracle with no luck. I'm using Oracle SQL Developer to execute the script. Code: set serveroutput on LinkRef_List VARCHAR2(4000); LinkRef VARCHAR2(10); LinkRef_List := '8371|223312|53298|213234|END'; WHILE LinkRef_List <> 'END' LOOP LinkRef := SUBSTR(LinkRef_List,1,(INSTR(LinkRef_List,'|')-1)); IF (SELECT DISTINCT COUNT(*) FROM ms.obj o WHERE o.origobjectid = LinkRef) > 0 THEN dbms_output.put_line(LinkRef + ' exists within the database'); END IF; LinkRef_List := REPLACE(LinkRef_List,LinkRef + '|',''); END LOOP; / This is what is belched out in the Statement Output. It apparently didn't like a single thing, so I must be miles away from what it should be. Error starting at line 2 in command: LinkRef_List VARCHAR2(4000) Error report: Unknown Command Error starting at line 3 in command: LinkRef VARCHAR2(10) Error report: Unknown Command Error starting at line 4 in command: LinkRef_List := '8371|223312|53298|213234|END' Error report: Unknown Command Error starting at line 5 in command: WHILE LinkRef_List <> 'END' Error report: Unknown Command Error starting at line 6 in command: LOOP Error report: Unknown Command Error starting at line 7 in command: LinkRef := SUBSTR(LinkRef_List,1,(INSTR(LinkRef_List,'|')