Format problem in SQL/Plus 9.2

In SQL/Plus 9.2 I am working with SET AUTOTRACE ON:
explain-plan
   0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=11 Card=1 Bytes=52
   1    0   TABLE ACCESS (BY INDEX ROWID) OF 'BER_POSITION' (Cost=2 Ca
          rd=1 Bytes=20)
   2    1     NESTED LOOPS (Cost=11 Card=1 Bytes=52)
   3    2       NESTED LOOPS (Cost=10 Card=1 Bytes=32)
   4    3         NESTED LOOPS (Cost=9 Card=1 Bytes=25)
   5    4           NESTED LOOPS (Cost=8 Card=1 Bytes=21)
   6    5             INDEX (FULL SCAN) OF 'BEV_PK' (UNIQUE) (Cost=35
          Card=14439 Bytes=72195)
   7    5             TABLE ACCESS (BY INDEX ROWID) OF 'EAP_ERGEBNISSE
          ' (Cost=2 Card=1 Bytes=16)
   8    7               INDEX (RANGE SCAN) OF 'EE_VGNR_IDX' (NON-UNIQU
...I would like to have the following:
explain-plan
   0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=11 Card=1 Bytes=52)
   1    0   TABLE ACCESS (BY INDEX ROWID) OF 'BER_POSITION' (Cost=2 Card=1 Bytes=20)
   2    1     NESTED LOOPS (Cost=11 Card=1 Bytes=52)
   3    2       NESTED LOOPS (Cost=10 Card=1 Bytes=32)
   4    3         NESTED LOOPS (Cost=9 Card=1 Bytes=25)
   5    4           NESTED LOOPS (Cost=8 Card=1 Bytes=21)
   6    5             INDEX (FULL SCAN) OF 'BEV_PK' (UNIQUE) (Cost=35 Card=14439 Bytes=72195)
   7    5             TABLE ACCESS (BY INDEX ROWID) OF 'EAP_ERGEBNISSE ' (Cost=2 Card=1 Bytes=16)
   8    7               INDEX (RANGE SCAN) OF 'EE_VGNR_IDX' (NON-UNIQU
...I set linesize to 1000, but it has no effect.

STFF [url http://forums.oracle.com/forums/click.jspa?searchID=6153770&messageID=1822302]Formatting output of execute plan in sqlplus

Similar Messages

  • Formatting problem using SQL*Plus Worksheet

    Hi!
    I would like to format values in a column. It is stored in the database as 'C' or 'F' or 'I'
    and I would like to see 'Corporate', 'Foundation' and 'Individuals' in my report.
    What is the command to "mask" these values into the values I would like to see?
    Thanks!

    Thanks, it works fine, just one more thing: the column formatting doesn't work any more...
    column dt format a15 heading 'Donor Type'
    column pn heading 'Program'
    column amount format 9999999999 heading 'Contributions|This Quarter'
    SELECT decode(dt,'C','Corporate','F','Foundation','I','Individual','Unknown'), pn, amount from a10;
    So it displays 'decode(dt' instead of 'Donor Type'
    It seems that the first line has no effect on the decoded column...

  • Problem running SQL PLUS in Oracle 8i and 9i on Windows XP

    I've tried installing both Oracle 8.17 Personal Edition and also 9i in Windows XP Professional (each on a different occassion). I have run into the same problem each time. The installation itself goes fine in both cases, but when I run SQL PLUS, the Log On screen appears for 1-2 seconds then whole thing just closes automatically, so I can't ever access that application which is the only thing I need to work with. Any ideas on what's going wrong? Thanks.

    Patrick,
    Well a few things. Did you try TNSPING to see if the listener is up? If it's ok, can you connect with FREE toad? Download Oracle OEM and install that (the SQL net and sql plus portions). If you can't get tnsping to work, sqlplus isn't going too either. I don't know why the sqplus is actually shutting down, but I'm guessing the TNS NAMES entry isnt there (in the tnsnames.ora file). If the tnsnames entry is there then tnsping should work. Get tnsping to work first.
    Tyler.

  • Problem with SQL Plus

    I'm getting started with Oracle.
    I've just successfully installed Oracle 11g. When I opened SQL plus, and tried typing a statement SELECT SYSDATE FROM dual, the answer display is : 2 .
    Then i tried with SELECT 2*6 FROM dual, and it still appeared with 2.
    I'm really confused.
    Plz explain it to me. Thanks in advance.
    Edited by: user13011143 on Apr 24, 2010 1:10 AM

    Is this what you are seeing?
    SQL> select sysdate from dual
      2  If so put a semi-colon at the end and hit the Enter key.
    SQL> select sysdate from dual
      2  ;
    SYSDATE
    24-APR-2010 03:28:13
    SQL>or more properly:
    SQL> SELECT sysdate FROM dual;
    SYSDATE
    24-APR-2010 03:29:10
    SQL> The semicolon is not optional.

  • Seek help to format spool file from SQL*PLUS

    I am running a Unix shell script to call a Oracle 11g SQL script from a Oracle database. In this SQL script, I need to connect to many different remote databases to select data, then sool these records as one big text file to a directory. Then email the file to related Group users. In the spool file, there is a line on the top of each page like this:
    DUMMY
    DB_NAME
    I know this is caused by connect to remote database in SQL*PLUS. My connection string is like this:
    Conn system/password@Oracle_SID
    How can I remove these lines or how to skip these lines into spool file? Please advise. Thanks in advnce. Wish all of you Happy New Year!!!

    Hi,
    It sounds like you have some kind of formatting (such as SQL*Plus TTITLE) producing the output you don't want. If that's the case, temporarily stopping the spooling might not help you. Find out what is causing the output that you don't want. You say that you know it is caused by the CONNECT statements, but it must be more than that. I've written scripts with CONNECT statements that don't have anything like what you reported at the top of each page; in fact, they don't even have pages: the output is one continuous stream. Find out what's putting the unwanted output there, and that will be a big clue as to how you can stop it.
    You say that you know the unwanted titles are there because of the CONNECT statements. If so, use database links instead of CONNECT. You don't have to use dbms_scheduler or utl_file; just eliminate the CONNECT statements. (I'm not saying that there's anything wrong with dbms_scheduler or utl_file; you should definitely investigate those tools. I'm just saying that using database links is independent of them.)
    What would happen if you did all your connecting to different databases at the OS level? Can you write a shell script that connects to each database in turn, and runs a SQL*Plus script in each one. Each SQL*Plus script would have a SPOOL or SPOOL ... APPEND command, or maybe you could build the SPOOL into a LOGIN.SQL script.

  • SQL*Plus Worksheet formating

    I have Oracle Client 8.1.7 installed in my computer, and I can't
    seem to have the desired output format with the SQL*Plus
    worksheet.
    I have a database where the tables have several column, and most
    of these columns are text with 1024 characters length. I set the
    linesize to a huge number (say 3000), the trim and trimspool on,
    and I get the results ok.
    But, when I want to do a select from a table which is much
    smaller, the worksheet is always writing the complete linesize...
    Is there a way to display the columns according to the size they
    actually have (e.g. defined by the longest element) that is
    always valid. I mean without having to set column options for
    each table.
    Thank you in advance.
    Ana

    The column width sizing rules are a little opaque. The column size is a function of things like the width that the DB thinks the column is (could be huge if a SQL function is being selected), the column name or heading width, the linesize (for very wide columns), any global format (e.g. SET NUMWIDTH), or the explicit COLUMN FORMAT.
    For consistency and portability I'd always recommend using an explicit COLUMN FORMAT. You can never tell if someone is going to run your report after previously setting a COLUMN FORMAT of the same name. Or a new database version may come out where the default datatype of a SQL function has changed. In the past this has happened when CHARs became the longer VARCHAR2s.
    I don't think Enterprise Manager's SQL Worksheet (a simplistic interface that just calls SQL*Plus in the background) is doing anything special for formatting. So COLUMN FORMAT will work fine.
    -- CJ

  • Sql Plus and Unicode (or utf-8) characters.

    Hello,
    i have problem with Sql Plus and unicode files. I want to execute Start {filename}, where {filename} is file in unicode format (this file have to contains german and polish characters). But i receive error message. It is possible to read from unicode (or utf-8) file and execute commands from this file)?
    Thanks in advance.
    Pawel Przybyla

    What is your client operating system characterset?

  • Unable to connect to an instance using EM but connecting fine with SQL*Plus

    Good morning,
    I followed these steps (from the 2 Day DBA document):
    1. I created a template (including database) from an instance named "orcl" using DBCA, before proceeding to create the template, DBCA informed me that the instance would be shutdown, I told it to proceed.
    2. The template was created successfully.
    3. I am now unable to log into the orcl instance using EM, yet I can log into that instance without any problems using SQL*Plus.
    The Question: Why am I not able to connect to the instance using EM ? and what do I need to do to correct this problem ?
    Thank you very much for your help,
    John.
    PS: in case it may be helpful, the listener, tnsnames and Sqlnet files follow:
    # listener.ora Network Configuration File: E:\Oracle\product\11.2.0\dbhome_1\network\admin\listener.ora
    # Generated by Oracle configuration tools.
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = CLRExtProc)
          (ORACLE_HOME = E:\Oracle\product\11.2.0\dbhome_1)
          (PROGRAM = extproc)
          (ENVS = "EXTPROC_DLLS=ONLY:E:\Oracle\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
          (ADDRESS = (PROTOCOL = TCP)(HOST = ORACLE2DAY1)(PORT = 1521))
    ADR_BASE_LISTENER = E:\Oracle
    # tnsnames.ora Network Configuration File: E:\Oracle\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    DBCA =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = ORACLE2DAY1)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = dbca.localsite.com)
    ORACLR_CONNECTION_DATA =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
        (CONNECT_DATA =
          (SID = CLRExtProc)
          (PRESENTATION = RO)
    LISTENER_ORCL =
      (ADDRESS = (PROTOCOL = TCP)(HOST = ORACLE2DAY1)(PORT = 1521))
    ORCL =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = ORACLE2DAY1)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = orcl.localsite.com)
    # sqlnet.ora Network Configuration File: E:\Oracle\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
    # Generated by Oracle configuration tools.
    # This file is actually generated by netca. But if customers choose to
    # install "Software Only", this file wont exist and without the native
    # authentication, they will not be able to connect to the database on NT.
    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

    Hi Chinar,
    What you suggested solved the problem.
    I am grateful for your help but, please, the next time you suggest a process that takes over an hour to complete, let me know beforehand.
    thank you for your help, I do appreciate it.
    John.
    PS: here are the result of the process:
    0 07:57 [Oracle] [17G] [608M] E:\Temp>emca -deconfig dbcontrol db -repos drop
    STARTED EMCA at Aug 15, 2010 7:58:21 AM
    EM Configuration Assistant, Version 11.2.0.0.2 Production
    Copyright (c) 2003, 2005, Oracle.  All rights reserved.
    Enter the following information:
    Database SID: orcl
    Listener port number: 1521
    Password for SYS user:
    Password for SYS user: abc123
    Password for SYSMAN user:
    Do you wish to continue? [yes(Y)/no(N)]: y
    Aug 15, 2010 7:59:37 AM oracle.sysman.emcp.EMConfig perform
    INFO: This operation is being logged at E:\Oracle\cfgtoollogs\emca\orcl\emca_201
    0_08_15_07_58_21.log.
    Aug 15, 2010 7:59:38 AM oracle.sysman.emcp.EMDBPreConfig performDeconfiguration
    WARNING: EM is not configured for this database. No EM-specific actions can be p
    erformed.
    Aug 15, 2010 7:59:38 AM oracle.sysman.emcp.EMReposConfig invoke
    INFO: Dropping the EM repository (this may take a while) ...
    Aug 15, 2010 8:06:59 AM oracle.sysman.emcp.EMReposConfig invoke
    INFO: Repository successfully dropped
    Enterprise Manager configuration completed successfully
    FINISHED EMCA at Aug 15, 2010 8:07:17 AM
    0 08:09 [Oracle] [17G] [355M] E:\Temp>emca -config dbcontrol db -repos create
    STARTED EMCA at Aug 15, 2010 8:09:23 AM
    EM Configuration Assistant, Version 11.2.0.0.2 Production
    Copyright (c) 2003, 2005, Oracle.  All rights reserved.
    Enter the following information:
    Database SID: orcl
    Listener port number: 1521
    Listener ORACLE_HOME [ E:\Oracle\product\11.2.0\dbhome_1 ]:
    Password for SYS user:
    Password for DBSNMP user:
    Password for SYSMAN user:
    Password for SYSMAN user: Email address for notifications (optional):
    Outgoing Mail (SMTP) server for notifications (optional):
    You have specified the following settings
    Database ORACLE_HOME ................ E:\Oracle\product\11.2.0\dbhome_1
    Local hostname ................ 192.168.3.134
    Listener ORACLE_HOME ................ E:\Oracle\product\11.2.0\dbhome_1
    Listener port number ................ 1521
    Database SID ................ orcl
    Email address for notifications ...............
    Outgoing Mail (SMTP) server for notifications ...............
    Do you wish to continue? [yes(Y)/no(N)]: y
    Aug 15, 2010 8:10:51 AM oracle.sysman.emcp.EMConfig perform
    INFO: This operation is being logged at E:\Oracle\cfgtoollogs\emca\orcl\emca_201
    0_08_15_08_09_23.log.
    Aug 15, 2010 8:11:10 AM oracle.sysman.emcp.EMReposConfig createRepository
    INFO: Creating the EM repository (this may take a while) ...
    Aug 15, 2010 8:43:41 AM oracle.sysman.emcp.EMReposConfig invoke
    INFO: Repository successfully created
    Aug 15, 2010 8:44:09 AM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepos
    itory
    INFO: Uploading configuration data to EM repository (this may take a while) ...
    Aug 15, 2010 8:47:39 AM oracle.sysman.emcp.EMReposConfig invoke
    INFO: Uploaded configuration data successfully
    Aug 15, 2010 8:48:31 AM oracle.sysman.emcp.util.DBControlUtil configureSoftwareL
    ib
    INFO: Software library configured successfully.
    Aug 15, 2010 8:48:31 AM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibra
    ry
    INFO: Deploying Provisioning archives ...
    Aug 15, 2010 8:53:19 AM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibra
    ry
    INFO: Provisioning archives deployed successfully.
    Aug 15, 2010 8:53:34 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
    INFO: Securing Database Control (this may take a while) ...
    Aug 15, 2010 8:54:22 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
    INFO: Database Control secured successfully.
    Aug 15, 2010 8:54:38 AM oracle.sysman.emcp.util.DBControlUtil startOMS
    INFO: Starting Database Control (this may take a while) ...
    Aug 15, 2010 9:12:50 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
    INFO: Database Control started successfully
    Aug 15, 2010 9:13:09 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
    INFO: >>>>>>>>>>> The Database Control URL is https://192.168.3.134:5501/em <<<<
    <<<<<<<
    Aug 15, 2010 9:14:22 AM oracle.sysman.emcp.EMDBPostConfig invoke
    WARNING:
    ************************  WARNING  ************************
    Management Repository has been placed in secure mode wherein Enterprise Manager
    data will be encrypted.  The encryption key has been placed in the file: E:/Orac
    le/product/11.2.0/dbhome_1/192.168.3.134_orcl/sysman/config/emkey.ora.   Please
    ensure this file is backed up as the encrypted data will become unusable if this
    file is lost.
    Enterprise Manager configuration completed successfully
    FINISHED EMCA at Aug 15, 2010 9:14:22 AM
    0 09:14 [Oracle] [17G] [603M] E:\Temp>

  • SQL *PLUS issue

    I have an unusual problem in SQL PLUS. When the SQL statement is a DML things go fine - no problem, BUT when the SQL statement is a DDL (like creating a database object )the process hangs. Things get more interesting ... if I open another SQL PLUS session and check out, I find that the DDL has done its task. But the first SQL session (where I issued the DDL) is still hanging. If anyone has any idea please do let me know. Any help would be very useful
    Thanks
    Mustafa

    The dot is used as like concatenation operator in sqlplus. If you need to add characters to the end of the variabel, you use a dot. If you need to add .chars then you need two dots.
    With a dot
    SQL> SELECT 'Say &something.not' FROM dual;
    Enter value for something: something
    old   1: SELECT 'Say &something.not' FROM dual
    new   1: SELECT 'Say somethingnot' FROM dual
    'SAYSOMETHINGNOT
    Say somethingnotand without
    SQL> SELECT 'Say &somethingnot' FROM dual;
    Enter value for somethingnot: something
    old   1: SELECT 'Say &somethingnot' FROM dual
    new   1: SELECT 'Say something' FROM dual
    'SAYSOMETHING
    Say somethingTTFN
    John

  • SQL*Plus Not responding when calling edit command

    When I write a Query in SQL Plus 9.2.0.1.0, Installed in Windows XP SP2, and running EDIT command, notepad opens and then SQL Plus and Notepad both hangs. By killing notepad.exe process I can continue working in SQL Plus.
    I tried changing the default editor to ultra edit, wordpad, etc. But It seems to be a SQL Plus error, with all editors I set up, Editor Hangs.
    The same things happende me installing the Oracle 9i client in another machine.
    Need help with this, thanks!!

    Sounds strange - and does not sound like a SQL*Plus problem. SQL*Plus uses the CreateProcess() Win32 API call to create the editor process. Then it waits for this process' process handle to cease to exist before it continues. SQL*Plus does not "hang" - it simply waits for the spawned process to terminate before it continues.
    It is not possible for one process to "hang" another process it created via the CreateProcess() call. It will need to interact with that spawned process in other ways to make it hang. Caveat: unless the spawned process does not "like" the parameters passed to it via the CreateProcess() call...
    The only parameter passed is the filename (usually afiedt.buf) by SQL*Plus - and that should not cause the editor to hang.
    Unless there is a specific Oracle bug you're running in, this problem sounds more like a Windows issue. After using the ED command in SQL*Plus, can you manually view and edit the afiedt.buf file it created?

  • SQL Plus not work with domain user

    Hey guys,
    have a problem with sql plus in our network. when i started it with the admin it works. but when i started it with a user account, fill in the username, the password and the host and click on the ok button, the window closes and nothing happen. no error no new window, the window simply closes.
    what to do?
    regards

    Hi,
    There might be different reasons behind this.
    Check whether user is created in database or not.
    There might be possibility that, user is in different database.
    SELECT * FROM V$DATABASE; --This will help you to findout database name.
    SELECT * FROM DBA_USERS WHERE USERNAME = 'HR';  --HR is user present on database. If your user is present in database then user might not have connect privilege.
    GRANT CONNECT , RESOURCE TO HR; --HR is user. To execute this command, login as sys You can also try to login with command prompt.
    sqlplus user/password@host

  • XMLType and SQL*Plus 9.0

    XMLType is automatically formatted in SQL*Plus 9.2. But, how can I format it on SQL*Plus 9.0.1? Now I only obtain tuples like XMLTYPE().

    Oracle DS is not the proper software for this purpose, take Oracle 9i client CD instead.

  • (SQL*PLUS HELP) RUNNING PUPBLD OR HELPINS ASKS FOR SYSTEM_PASS

    제품 : ORACLE SERVER
    작성날짜 : 2002-04-22
    (SQL*PLUS HELP) RUNNING PUPBLD OR HELPINS ASKS FOR SYSTEM_PASS
    ==============================================================
    PURPOSE
    이 내용은 SQL*Plus 상에서 SQL*Plus command의 help를 보기 위한 방법이다.
    Problem Description
    SQL*Plus command의 help를 보기 위해서 helpins를 수행하면
    SYSTEM_PASS is not set이라는 에러 메시지가 발생하는 경우가 있다.
    이 자료는 pupbld 또는 helpins를 수행하기 전에 SYSTEM_PASS 환경변수를
    셋팅하는 방법에 대한 자료이다.
    아래와 같은 에러가 발생하는 경우 조치 방법에 대해 알아본다.
    SYSTEM_PASS not set.
    Set and export SYSTEM_PASS, then restart help (for helpins or
    profile for pupbld) installation.
    Workaround
    none
    Solution Description
    이 스크립트는 system user로 database에 connect되어 수행되어야 한다.
    helpins를 수행하기 위해서는 SYSTEM_PASS 환경변수가 셋팅되어 있어야 한다.
    NOTE
    For security reasons, do not set this variable in your shell
    startup scripts. (i.e. .login or .profile.).
    Set this environment variable at the prompt.
    1. Prompt에서 환경변수를 셋팅하기
    For C shell:
    % setenv SYSTEM_PASS system/<password>
    For Korn or Bourne shells:
    $ SYSTEM_PASS=system/<password> ;export SYSTEM_PASS
    2. Now run "$ORACLE_HOME/bin/pupbld" or "$ORACLE_HOME/bin/helpins".
    % cd $ORACLE_HOME/bin
    % pupbld
    or
    % helpins
    주의사항
    $ORACLE_HOME/bin/pupbld 스크립트와 $ORACLE_HOME/bin/helpins 스크
    립트를 수행하기 위해서는 반드시 SYSTEM_PASS 환경변수를 필요로 한다.
    Reference Document
    <Note:1037075.6>

    check it please whether it is a database version or just you are installing a client. Install Enterprize database on 2k system. I you are running a client software then you are to deinstall it.

  • SQL*PLUS mouse scroling not working..

    Hi,
    I am facing one problem in SQL*Plus tool, and couldn't find solution. Please help me.
    I have set the line size 9999. When i select the data from table (or dual) which is having more line size that the screen size, some of the part is displayed on screen that the rest have been cut. I cannot scroll the screen horizontally to see the rest part of the output. If i set the line size 80, the whole output is displayed in wrapped style.
    Is there any other configuration or settings i need to do.. Please let me know what i am missing..
    Regards,
    Dipali.

    Aman, Amar and Jaffy,
    Thanks for your reply.
    Aman, yes dear, i can use DOS prompt, but i am using SQL*Plus tool and facing problem it. Instade of looking for alternative i want to solve this problem.
    Jaffy, i go through the index of the book given in the link by you. But didn't find the topic related to my problem.
    Aman, I tried to increase the screen buffer size from environment dialogue box. When i tried for first time, i was asked to disconnect from database. I did that, increased the buffer width to 10000 and keep the lenght untouchd (1000) and set the line size to 9999. Then i connected to DB and checked it and i got what i wanted :).
    But when i tried for next time, i was not getting that..It was behaving strange.. when i set the buffer size 10000, it showed message that 'screen buffer lenght must be between 80 to 1000' and when i set it to 1000 it showed 'screen buffer lenght must be between 80 to 2000' !!!!
    I am still trying.....
    Thank you.. :)
    Dipali.

  • Does SQL Plus recognize any type of newline character from DBMS_OUTPUT?

    I am building a complex string inside a procedure and displaying with dbms_output.put_line. It works fine in SQL Developer but when I use it in SQL Plus it comes out goofy. It's been narrowed down to me using CHR(10) where I want line breaks. Is it possible to display a "formatted" varchar2 in SQL Plus as I'm expecting them? I even tried using .put with no luck.
    Using:
    Oracle 10.2.0.4.0
    SQL Plus 10.2.0.1 / 9.2.something
    Here's a small example:
    set serverout on
    set linesize 10
    declare
      lv_string varchar2(32767);
    begin
      for x in 1..5
      loop
        lv_string := lv_string || 'I AM LINE ' || to_char(x) || chr(10);
      end loop;
      dbms_output.put_line(lv_string);
    end;
    Expected Output (What I'm getting in SQL Developer):
    I AM LINE 1
    I AM LINE 2
    I AM LINE 3
    I AM LINE 4
    I AM LINE 5
    Actual Output (SQL Plus):
    I AM LINE
    1
    I AM
    LINE 2
    I
    AM LINE
    3
    I AM
    LINE 4
    I
    AM LINE 5Right now I'm using a workaround, but would like to use a character (or combination of character) that SQL Plus will play nice with...if there are any.
    declare
      lv_string     varchar2(32767);
      lv_start      pls_integer;
      lv_end        pls_integer := 0;
      c_newl        constant varchar2(1) := chr(10);
    begin
      for x in 1..200
      loop
        lv_string := lv_string || 'I AM LINE ' || to_char(x) || c_newl;
      end loop;
      loop
        lv_start := lv_end + 1;
        lv_end := instr(lv_string, c_newl, lv_start);
        exit when lv_end <= lv_start;
        dbms_output.put_line(substr(lv_string, lv_start, lv_end- lv_start));
      end loop;
    end;

    Hi,
    you need to increase your linesize:
    SQL> declare
      2    lv_string varchar2(32767);
      3  begin
      4    for x in 1..5
      5    loop
      6      lv_string := lv_string || 'I AM LINE ' || to_char(x) || chr(10);
      7    end loop;
      8    dbms_output.put_line(lv_string);
      9  end;
    10  /
    I AM LINE
    1
    I AM
    LINE 2
    I
    AM LINE
    3
    I AM
    LINE 4
    I
    AM LINE 5
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.01
    SQL> set lines 255
    SQL> declare
      2     lv_string varchar2(32767);
      3   begin
      4     for x in 1..5
      5     loop
      6       lv_string := lv_string || 'I AM LINE ' || to_char(x) || chr(10);
      7     end loop;
      8     dbms_output.put_line(lv_string);
      9   end;
    10   /
    I AM LINE 1
    I AM LINE 2
    I AM LINE 3
    I AM LINE 4
    I AM LINE 5
    PL/SQL procedure successfully completed.

Maybe you are looking for

  • Error while query execution - Query getting locked by another user execute

    Hi All, I am facing an issue .. When I execute a query I am getting an error message ie popping as blocked by some other user. And I able to see the lock when I go to SM12. If the other user logged off or if we unlock his entry, then both the workboo

  • Configuring Audio Capture

    I am trying to sample the microphone using a recordStream. How do I control the rate, bits, unsigned, etc... If I use: p = Manager.createPlayer("capture://audio"); Under Ktools everything slows to a trickle and takes about 5 seconds to record 20 miil

  • Populating values in interactive form drop

    Hi, I have created an adobe form, in which I have to create drop down box which has to read values from simple type. for this i have created context attribute whose type is simple type, and i have draged that context attribute in adobe form, and made

  • Number of elements in a geometry

    Hi All, I am wondering if there is any way to enquire on a geometry to determine how many elements it contains. Eg: a polygon with an outer boundary and two inner holes would have three elements. I am guessing that the sdo_elem_info_array would need

  • New VPN3005 Concentrator - Authorization Error

    If you have solved the following issue before then kindly give me a clue: The VPN3005 has only been used a few times in the test lab, when suddenly it begins to refuse any attempts to make config changes - both CLI and Web. It also outputs the follow