BUG : DBMS_OUTPUT.put_line and tabs in sqldeveloper 1.2.1 - build 32.00

Hi Guys.
I upgraded from 1.2 and it appears that dbms_output.put_line is now broken.
Consider the following:
begin
   dbms_output.put_line('hello world');
end;Process:
1. Load SQL Developer
2. Open a connection to DB
3. Go to DBMS Output tab
4. Enable server output
5. Type in the code (as above)
6. Hit F5
The bug/new feature:
After hitting f5, the DBMS Output tab switches to Script output where by I am presented with "anonymous block completed". In 1.2 (and previous versions) I used to see
anonymous block completed
hello world
in the Script Output tab.
Now I have to switch back to the DBMS Output tab. My problem with this is that there is far too much clicking. Why redirect me away from the tab that is going to actually display the script output only for me to have to click back into that tab? I just don't get it.
Regards
Kristian Jones
http://kristianjones.blogspot.com
Message was edited by:
Kris Jones

Hi,
I also have the problem with the new Released.
SQL Dev 1.2.0.29.98 upgraded with Check for Updates to 1.2.1.32.00
On Windows XP.
I did exactly as Kris Jones post, using Run Script
but, it seems that my SQL Developer doesn't do anything.
The progress bar is active like processing somthing, well, it processes forever.
I tried to cancel the process (button Cancel), but the panel shows that it is still trying to cancel the process (all buttons are disabled except Cancel), although I can do another select (use CTRL + Enter because F9 doesn't work) within the same SQL Worksheet and the panel goes back to the active panel again.
Well, there must be something wrong with the Run Script.
Since any query or pl/sql block seems running forever if I use Run Script.
I try on the SQL Developer 1.2.0.29.98 (luckily, I still keep the backup, just in case) and it shows the result as wanted.
Is there something wrong within my SQL Developer 1.2.0.32.00?
Or there is some patches which I should download?
Is it another bug?
Many thanks,
Buntoro

Similar Messages

  • Dbms_output.put_line  and sqlplus : output truncated to 100 Characters.

    HI all,
    please see the following script where the variable length is more than a 100 charecters...
    When i run this in sqlplus with SERVEROUTPUT ON, i see the ouput being truncated to 100 charecters.
    sql> ed
    Wrote file afiedt.buf
      1  declare
      2     l_var varchar2(400);
      3  begin
      4     l_var := 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh
      5     dbms_output.put_line(length(l_var));
      6     dbms_output.put_line(l_var);
      7* end;
      8  /
    130
    abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvI think I am looking for a sqlplus "SET XXXX..." command, but my search has been futile so far.
    Please advice.
    Thanks,
    John.

    Thanks for your reply .. Frank.
    Sorry... I Previewed the post but did not notice my code being truncated in my sqlplus sesssion.
    The actual script has the output to 130 charecters. but when i close the edit (afeidt.buf) and execute it, the display only shows 100 charecters...
    My SQLPLUS version is 9.2.0.1.
    I am using the "WE8ISO8859P1" charecter set.
    declare
        l_var varchar2(500) := 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz';
    begin
        dbms_output.put_line(length(l_var));
        dbms_output.put_line(l_var);
    end;
    130
    abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv
      1  declare
      2      l_var varchar2(500) ;
      3  begin
      4      for i in 1 .. 5 loop
      5          l_var := l_var || 'abcdefghijklmnopqrstuvwxyz';
      6      end loop;
      7      dbms_output.put_line(length(l_var));
      8      dbms_output.put_line(l_var);
      9* end;
    sql> /
    130
    abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv

  • [SOLVED] Surf-hg and tabbed-hg from aur fail to build

    Hi,
    I'm trying to install surf-hg and tabbed-hg from aur and when I makepkg -i this happens:
    ==> ERROR: A failure occurred in build().
    Aborting...
    I've tried to apply this patch to surf's config.mk but it fails anyway.
    diff -paur surf/config.mk surf.new/config.mk
    --- surf/config.mk 2012-01-29 11:46:00.851597838 +0100
    +++ surf.new/config.mk 2012-01-29 11:46:36.633503895 +0100
    @@ -15,7 +15,7 @@ GTKLIB = `pkg-config --libs gtk+-2.0 web
    # includes and libs
    INCS = -I. -I/usr/include -I${X11INC} ${GTKINC}
    -LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${GTKLIB} -lgthread-2.0
    +LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${GTKLIB} -lgthread-2.0 -ljavascriptcoregtk-1.0
    # flags
    CPPFLAGS = -DVERSION=\"${VERSION}\"
    Can anyone help me please?
    Last edited by whooper (2012-03-01 21:42:10)

    Yes they both fail to build, manually or with packer.
    I deleted the src directory but it still fails.
    packer -S surf-hg
    Aur Targets (1): surf-hg
    Proceed with installation? [Y/n] y
    Edit surf-hg PKGBUILD with $EDITOR? [Y/n] n
    ==> Determining latest hg revision...
    pulling from http://hg.suckless.org/surf
    searching for changes
    no changes found
    -> Version found: 238
    ==> Making package: surf-hg 238-1 (Thu Mar 1 00:27:47 WET 2012)
    ==> Checking runtime dependencies...
    ==> Checking buildtime dependencies...
    ==> Retrieving Sources...
    ==> Extracting Sources...
    ==> Removing existing pkg/ directory...
    ==> Entering fakeroot environment...
    ==> Starting build()...
    cleaning
    pulling from http://hg.suckless.org/surf
    searching for changes
    no changes found
    ==> ERROR: A failure occurred in build().
    Aborting...
    The build failed.

  • Printing messages in Log File and Output File using Dbms_output.put_line

    Hi,
    I have a requirement of printing messages in log file and output file using dbms_output.put_line instead of fnd_file.put_line API.
    Please let me know how can I achieve this.
    I tried using a function to print messages and calling that function in my main package where ever there is fnd_file.put_line. But this approach is not required by the business.
    So let me know how I can achieve this functionality.
    Regards
    Sandy

    What is the requirement that doesn't allow you using fnd_file.put_line?
    Please see the following links.
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Dbms_output.put_line+AND+Log+AND+messages&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    https://forums.oracle.com/forums/search.jspa?threadID=&q=%22dbms_output.put_line+%22+AND+concurrent&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • How to Populate a table with DBMS_OUTPUT.put_line

    Hey Guys, it's Xev.
    Please only pleasant people reply to this.
    I have a PL/SQL Program that searches for strings and then at the end of it it prints out to DBMS_OUTPUT.put_line.
    I have the owner, the table_name, the column name and the count, then it goes to DBMS_OUTPUT.put_line
    What i want to do, is take the results of DBMS_OUTPUT.put_line and insert it into a table.
    Here is the script I am talking about, as you can see it's simple, yet for me it works.  I want to take the results of this and insert it into a table. How can i do  that??
    set serveroutput on size unlimited
    execute DBMS_OUTPUT.ENABLE (buffer_size => NULL);
    DECLARE
       FND_GOVIDS       INTEGER;
       BEGIN
    FOR t  IN (SELECT owner, table_name, column_name
                FROM all_tab_columns
                WHERE owner = upper('&SCHEMA_NAME'))
    LOOP
      BEGIN
        EXECUTE IMMEDIATE 'with a as ( select  case when REGEXP_LIKE(' || t.column_name ||
    --This searches for 8 Alpha Digits
    ',''^([[:alpha:]]{2}|[[:alpha:]]{4})?[ ]?[0-9]{8}[ ]?([[:alpha:]]{2}|[[:alpha:]]{4})?$'')
    then ''Match Found''
    else ''No Match Found'' end as output from ' || t.owner || '.' || t.table_name || ')
    select count(*) from a where a.output=''Match Found'' '
          INTO FND_GOVIDS ;
    IF FND_GOVIDS > 0         THEN
    DBMS_OUTPUT.put_line (
    t.owner
    || '.'
    || t.table_name
    || ' '
    || t.column_name
    || ' '
    || FND_GOVIDS);
      END IF;
      EXCEPTION
        WHEN OTHERS
          THEN
          DBMS_OUTPUT.put_line (
          'Generic Error '
          || t.column_name
          || ' from '
          || t.owner
          || '.'
          || t.table_name);      
          END;
       END LOOP;
    END;

    Nope, the table is empty....
    But it ran without error??!?! Wait a minute, I think i have to commit right? Since it's not straight sql, ok, that's what I am going to try..
    set serveroutput on size unlimited
    execute DBMS_OUTPUT.ENABLE (buffer_size => NULL);
    DECLARE
       FND_GOVIDS       INTEGER;
       BEGIN
    FOR t  IN (SELECT owner, table_name, column_name
                FROM all_tab_columns
                WHERE owner = upper('&SCHEMA_NAME'))
    LOOP
      BEGIN
        EXECUTE IMMEDIATE 'with a as ( select  case when REGEXP_LIKE(' || t.column_name ||
    --This searches for 6 Alpha Digits
    ',''^([[:alpha:]]|[[:alpha:]]{3})[0-9]{6}$'')
    then ''Match Found''
    else ''No Match Found'' end as output from ' || t.owner || '.' || t.table_name || ')
    select count(*) from a where a.output=''Match Found'' '
          INTO FND_GOVIDS ;
    /*Table insert for resulting */
    IF FND_GOVIDS > 0 THEN
    INSERT INTO "SMEG"."DYNAMIC_COUNTS" (T_OWNER, T_TABLE_NAME, T_COLUMN_NAME, FND_GOVIDS) VALUES
    ('t.owner','t.table_name','t.column_name','FND_GOVIDS');
      END IF;
    /* dbms_output */
    IF FND_GOVIDS > 0 THEN
    DBMS_OUTPUT.put_line (t.owner || '.' || t.table_name || ' ' || t.column_name || ' ' || FND_GOVIDS);
      END IF;
    /* Exception Handeling */
      EXCEPTION
        WHEN OTHERS
          THEN
          DBMS_OUTPUT.put_line (
          'Generic Error '
          || t.column_name
          || ' from '
          || t.owner
          || '.'
          || t.table_name);     
          END;
       END LOOP;
    END;

  • Pro*Cobol and DBMS_OUTPUT.PUT_LINE

    I am new to Pro*Cobol and had a simple question (I hope).
    I have a stored proc that contains DBMS_OUTPUT.PUT_LINE stmts
    and I can see those in SQLPlus (when serveroutput=on), but I do
    not see them when I call it from Pro*Cobol. Is there a
    precompiler setting or something I need to set?

    'Far as I know, you'll have to repeatedly call
    dbms_output.get_line in your Pro*Cobol program to
    get the server output generated by your stored procedure.
    Hope that helps.
    All the best
    Michael

  • Output from dbms_output.put_line splits and move to next line

    Hi All,
    I am printing out a list using dbms_output.put_line its like
    One or more of following Required Parameters are missing:
    1. Primary Field
    2. Structure Field
    3. Structure
    Table
    4. List File Name
    5. Query Directory
    6. Query String
    but I don't know why third option is splitting and moving to second line. any idea? its not that long even then.
    thanks

    set linesize 150
    or set it as per your requirement

  • Print and dbms_output.put_line

    wats the diff between prin and dbms_output.put_line

    BEDE wrote:
    Do not expect that the dbms_output.put or .put_line output show while the procedure or PL/SQL block is running. It will show only after it finished running.Unless something else within that PL/SQL execution reads the dbms_output buffer and directs the output somewhere where it can be read during run-time, such as putting it onto a table using an autonomous transaction or putting it out using a web service to another destination etc. Although generally, people don't do that I agree, but it can be done if required.

  • Possible bug with TREAT and EXECUTE IMMEDIATE

    Hello, i experienced a strange behavior which seems to be a bug.
    Consider following definitions:
    CREATE OR REPLACE TYPE T_Base FORCE AS OBJECT (
      DummyProperty NUMBER
    ) NOT FINAL;
    CREATE OR REPLACE TYPE T_Child UNDER T_Base (
      AnotherDummyProperty  NUMBER
    CREATE OR REPLACE FUNCTION SpecificValidation (iValue T_Child) RETURN NUMBER IS
    BEGIN
      -- some specific validation is done here, not important for the example
      RETURN NULL;
    END;
    CREATE OR REPLACE PROCEDURE ValidateIt (iValue T_Child) IS
      lResult NUMBER;
    BEGIN
      -- The principle used here is that each client can have its own implementation of validation function, and when it does not exist, we do not care.
      -- In reality we put functions and procedures into packages, I narrowed it to a minimal working example.
      BEGIN
        EXECUTE IMMEDIATE 'BEGIN :lResult := SpecificValidation(:iValue); END;'
          USING OUT lResult, IN iValue;
      EXCEPTION WHEN OTHERS THEN
        IF INSTR(SQLERRM, 'PLS-00201') = 0 THEN
          RAISE;
        END IF;
      END;
    END;
    CREATE OR REPLACE PROCEDURE Process (iValue T_Base) IS
    BEGIN
      -- in fact we know that iValue must be of typ T_Child, it is checked using IS OF ( ) operator and exception is raised if this check fails
      -- This does not work for some reason.
      -- It fails in EXECUTE IMMEDIATE with PLS-00306. I don't really get why, because ValidateIt accepts a value of type T_Child and it passes it to the validation procedure, which also expects value of type T_Child.
      ValidateIt(TREAT(iValue AS T_Child));
    END;
    CREATE OR REPLACE PROCEDURE Process2 (iValue T_Base) IS
      lChild  T_Child;
    BEGIN
      -- The only difference here is that result of TREAT is saved to a variable.
      -- This works as expected.
      lChild := TREAT(iValue AS T_Child);
      ValidateIt(lChild);
    END;
    In reality it is much more complex, I narrowed it to a minimal working example.
    Now when running this:
    DECLARE
      lItem T_Base := T_Child(5, 2);
    BEGIN
      BEGIN
        -- This call will end up with PLS-00306 error.
        Process(lItem);
        dbms_output.put_line('Process completed successfully.');
      EXCEPTION WHEN OTHERS THEN
        dbms_output.put_line('Exception when calling Process.');
        dbms_output.put_line(SQLERRM);
        dbms_output.put_line(DBMS_UTILITY.FORMAT_ERROR_BACKTRACE);
      END;
      BEGIN
        Process2(lItem);
        dbms_output.put_line('Process2 completed successfully.');
      EXCEPTION WHEN OTHERS THEN
        dbms_output.put_line('Exception when calling Process2.');
        dbms_output.put_line(SQLERRM);
        dbms_output.put_line(DBMS_UTILITY.FORMAT_ERROR_BACKTRACE);
      END;
    END;
    then call to Process fails with PLS-00306 on EXECUTE IMMEDIATE.
    The only difference between Process and Process2 is that in Process2, result of TREAT is saved to a variable of type T_Child.
    Is this behavior documented somwhere or is it a bug?

    That's interesting. I would say it is, or should be, a bug.
    Also interesting is, when I re-write your example to eliminate dynamic SQL and instead rely on dynamic method dispatch, the problem goes away... first, the changes:
    drop type T_Child;
    drop type T_Base
    CREATE OR REPLACE TYPE T_Base FORCE AS OBJECT ( 
      DummyProperty NUMBER 
    ) NOT FINAL
    CREATE OR REPLACE TYPE T_Child UNDER T_Base ( 
      AnotherDummyProperty  NUMBER 
    create or replace type T_Base_Processor as object (
      dummyProperty    number
    , static FUNCTION GetClientProcessor(iClientId varchar2) RETURN T_Base_Processor
    , member FUNCTION SpecificValidation (iValue T_Child) RETURN NUMBER
    , member PROCEDURE ValidateIt (iValue T_Child)
    , member PROCEDURE Process (iValue T_Base)
    , member PROCEDURE Process2 (iValue T_Base)
    ) NOT FINAL
    create or replace type T_Another_Processor under T_Base_Processor (
      overriding member FUNCTION SpecificValidation (iValue T_Child) RETURN NUMBER
    create or replace type body T_Base_Processor
    is
      static FUNCTION GetClientProcessor(iClientId varchar2) RETURN T_Base_Processor IS
    BEGIN
      return    case
            when upper(iClientId) = 'ADMINISTRATOR' then
                new T_Another_Processor(null)
            else
                new T_Base_Processor(null)
            end;
    END;
      member FUNCTION SpecificValidation (iValue T_Child) RETURN NUMBER IS 
    BEGIN 
      -- some specific validation is done here, not important for the example 
      dbms_output.put_line('T_Base_Processor.SpecificValidation');
      RETURN NULL; 
    END; 
      member PROCEDURE ValidateIt (iValue T_Child) IS 
      lResult NUMBER; 
    BEGIN 
      -- No more need for dynamic SQL, instead rely on dynamic dispatch
      lResult := SpecificValidation(iValue);
    END; 
      member PROCEDURE Process (iValue T_Base) IS 
    BEGIN 
      -- in fact we know that iValue must be of typ T_Child, it is checked using IS OF ( ) operator and exception is raised if this check fails 
      -- This does not work for some reason. 
      -- It fails in EXECUTE IMMEDIATE with PLS-00306. I don't really get why, because ValidateIt accepts a value of type T_Child and it passes it to the validation procedure, which also expects value of type T_Child. 
      ValidateIt(TREAT(iValue AS T_Child)); 
    END; 
      member PROCEDURE Process2 (iValue T_Base) IS 
      lChild  T_Child; 
    BEGIN 
      -- The only difference here is that result of TREAT is saved to a variable. 
      -- This works as expected. 
      lChild := TREAT(iValue AS T_Child); 
      ValidateIt(lChild); 
    END;
    end;
    create or replace type body T_Another_Processor
    is
      overriding member FUNCTION SpecificValidation (iValue T_Child) RETURN NUMBER
    is
    begin
      -- some other specific validation is done here, not important for the example 
      -- You could even call the overridden method as well using
      --   treat(self as T_Base_Processor).SpecificValidation(iValue)
      dbms_output.put_line('T_Another_Processor.SpecificValidation');
      RETURN NULL; 
    end;
    end;
    And again with slight modifications, your test block:
    DECLARE 
      lProcessor T_Base_Processor := T_Base_Processor.getClientProcessor('JOE');
      lItem T_Base := T_Child(5, 2); 
    BEGIN 
      BEGIN 
        -- This call no longer throws a PLS-00306 error. 
        lProcessor.Process(lItem); 
        dbms_output.put_line('Process completed successfully.'); 
      EXCEPTION WHEN OTHERS THEN 
        dbms_output.put_line('Exception when calling Process.'); 
        dbms_output.put_line(SQLERRM); 
        dbms_output.put_line(DBMS_UTILITY.FORMAT_ERROR_BACKTRACE); 
      END; 
      -- Demonstrate dynamic dispatch by choosing a different processor
      lProcessor := T_Base_Processor.getClientProcessor('ADMINISTRATOR');
      BEGIN 
        lProcessor.Process2(lItem); 
        dbms_output.put_line('Process2 completed successfully.'); 
      EXCEPTION WHEN OTHERS THEN 
        dbms_output.put_line('Exception when calling Process2.'); 
        dbms_output.put_line(SQLERRM); 
        dbms_output.put_line(DBMS_UTILITY.FORMAT_ERROR_BACKTRACE); 
      END; 
    END; 
    T_Base_Processor.SpecificValidation
    Process completed successfully.
    T_Another_Processor.SpecificValidation
    Process2 completed successfully.
    Gerard

  • SQl Developer  2.1.0.62 - dbms_output.put_line

    When trying to use dbms_output.put_line i seem to keep on getting messages in the logging Page tab and example would be:
    SEVERE     96     516     oracle.dbtools.db.DBUtil     Invalid column index
    This even seems to happen when doing a simple anonymous block witha single dbms_output.put_line command.
    I have tried closing SQL Developer and using a new session but same issue.
    Is this an install issue or something else?

    Dermot,
    I too am running on XP.
    I am running against a 9i DB in case that should make any difference.
    I have as a test switched back to my SQL Developer 1.5.5.59.69 version issued a dbms_output call from a block and it works.
    All i am doing is logging on to 9i DB
    Opening worksheet
    begin
    dbms_output.put_line('Test');
    END;
    I have then chosen View -> DBMS Output
    This then open a new a new window at bottom of screen, i then click on the cross to add a new DBMS Output window for my connection.
    I then run the code, this is where i now receive the messages in the Loggng Tab.
    Have just noticed that when i log into the 9i DB i receive the following in the looging Tab:
    SEVERE     103     26830     oracle.dbtools.db.DBUtil     ORA-02248: invalid option for ALTER SESSION
    Not sure what is causing this must be part of SQl developer Login procedure failing, but doesn't happen in vesrion 1.5.5.59.69
    Thanks
    Paul
    Edited by: Trotty on Sep 25, 2009 3:44 PM
    Edited by: Trotty on Sep 25, 2009 3:56 PM

  • Dbms_output.put_line truncate leading space?

    Hi guys,
    I am using Oracle 9i R2. Does anyone know that if 9i R2 dbms_output.put_line will truncate the leading space from a output line? I am running the function directly from sqlplus. Is it a default behaviour and could it be changed?
    Thanks for your help in advance.

    This is the default behaviour and very annoying it is too. AFAIK there is no way of switching this behaviour off (I'd be happy to be proved wrong on this). The following sample offers two workarounds - use of a leading character and use of an ASCII tab. Neither's idea, so take your pick.
    Cheers, APC
    SQL> set serveroutput on
    SQL> begin
    2 dbms_output.put(' ');
    3 dbms_output.put_line('hi!');
    4 dbms_output.put('. ');
    5 dbms_output.put_line('hi!');
    6 dbms_output.put(chr(9));
    7 dbms_output.put_line('hi!');
    8* end;
    hi!
    . hi!
    hi!
    PL/SQL procedure successfully completed.
    SQL>

  • DBMS_OUTPUT.PUT_LINE multi records from PL/SQL procedure to Java web page.

    Hello
    I will explain the scenario:
    In our java web page, we are using three text boxes to enter "Part number,Description and Aircraft type". Every time the user no need to enter all these data. The person can enter any combination of data or only one text box. Actually the output data corresponding to this input entries is from five Oracle table. If we are using a single query to take data from all the five tables, the database will hang. So I written a procedure "SEARCH1",this will accept any combination of values (for empty values we need to pass NULL to this procedure) and output data from all the five tables. When I executing this procedure in SQL editor, the execution is very fast and giving exact result. I used "dbms_output.put_line" clause for outputing multiple records in my procedure. The output variables are "Serial No, part Number, Description, Aircraft type,Part No1,Part No2,Part No3,Part No4". I want to use the same procedure "SEARCH1" for outputing data in java web page.The passing argument I can take from the text box provided in java web page. I am using jdbc thin driver to connect our java web page to Oracle 9i database.
    Note1 : If any combination of search item not available, in procedure itself I am outputing a message like "Part Number not found". Here I am using four words ("Part" is the first word,"Number" is the second,"Not" s the third, and "found" is the fourth) for outputing this message.Is it necessary to equalise number of words I am using here to the record outputing eight variable?
    Our current development work is stopped because of this issue. So any one familier in this field,plese help me to solve our issue by giving the sample code for the same scenario.
    My Email-id is : [email protected]
    I will expect yor early mail.
    With thanks
    Pramod kumar.

    Hello Avi,
    I am trying to solve this issue by using objects. But the following part of code also throwing some warning like "PLS-00302: component must be declared". Plese cross check my code and help me to solve this issue.
    drop type rectab;
    create or replace type rectype as object(PartNo varchar2(30),Description varchar2(150),AIrcraft_type varchar2(15),status_IPC varchar2(30),status_ELOG varchar2(30),status_SUPCAT varchar2(30),status_AIRODWH varchar2(30));
    create or replace type rectab as table of rectype;
    create or replace package ioStructArray as
    procedure testsch2(pno in varchar2,pdes in varchar2,air in varchar2,orec in out rectab);
    end ioStructArray;
    create or replace package body ioStructArray as
    procedure testsch2(pno in varchar2,pdes in varchar2,air in varchar2,orec in out rectab) is
    mdescription varchar2(150);
    mpartnum varchar2(30);
    mpno varchar2(30);
    mdes varchar2(150);
    mair varchar2(15);
    mstat varchar2(1);
    cursor c1 is select partnum,description,aircraft_type from master_catalog where partnum=mpno and aircraft_type=mair and description like ltrim(rtrim(mdes))||'%';
    cursor c2 is select partnum from ipc_master where partnum=mpartnum;
    cursor c3 is select partnum from fedlog_data where partnum=mpartnum;
    cursor c4 is select partnum from superparts where partnum=mpartnum;
    cursor c5 is select part_no from supplier_catalog where part_no=mpartnum;
    mpno1 varchar2(30);
    mpno2 varchar2(30);
    mpno3 varchar2(30);
    mpno4 varchar2(30);
    mpno5 varchar2(30);
    maircraft_type varchar2(15);
    mstat1 varchar2(30);
    mstat2 varchar2(30);
    mstat3 varchar2(30);
    mstat4 varchar2(30);
    begin
    mstat:='N';
    mpno:=pno;
    mdes:=pdes;
    mair:=air;
    if mpno is not null and mdes is not null and mair is not null then
    begin
    mstat:='N';
    mpno:=pno;
    mdes:=pdes;
    mair:=air;
    for i in c1 loop
    mstat:='N';
    mstat1:='N';
    mstat2:='N';
    mstat3:='N';
    mstat4:='N';
    mpno1:=i.partnum;
    mpartnum:=i.partnum;
    mdescription:=i.description;
    maircraft_type:=i.aircraft_type;
    for j in c2 loop
    mpno2:=j.partnum;
    end loop;
    for k in c3 loop
    mpno3:=k.partnum;
    end loop;
    for l in c4 loop
    mpno4:=l.partnum;
    end loop;
    for m in c5 loop
    mpno5:=m.part_no;
    end loop;
    if mpno2=mpartnum then
    mstat1:=mpno2;
    end if;
    if mpno3=mpartnum then
    mstat2:=mpno3;
    end if;
    if mpno4=mpartnum then
    mstat3:=mpno4;
    end if;
    if mpno5=mpartnum then
    mstat4:=mpno5;
    end if;
    if mpno1=mpartnum then
    mstat:='Y';
    orec.PartNo:=mpno1;
    orec.Description:=mdescription;
    orec.AIrcraft_type:=maircraft_type;
    orec.status_IPC:=mstat1;
    orec.status_ELOG:=mstat2;
    orec.status_SUPCAT:=mstat3;
    orec.STATUS_AIRODWH:=status_AIRODWH;
    end if;
    end loop;
    end;
    end if;
    end testsch2;
    end ioStructArray;
    Expecting your early reply.
    With thanks
    Pramod kumar.

  • Dbms_output.put_line not printing in inner for loop using a parameter

    I cannot get the inner loop to print output. I can run both loops independent (hardcoding a value for the inner loop) Any help is apprecicated... Listed is the code
    set serveroutput on
    DECLARE
    cursor ACCNO_CUR is
    select accession_number from didb_studies where insert_time > to_date('02-JUN-12');
    cursor PATH_CUR (p1_accno VARCHAR2) is
    select distinct l.FILE_SYSTEM || '/' ||
    substr(LPAD(s.PATIENT_DB_UID, 12, '0'),1,3) || '/' ||
    substr(LPAD(s.PATIENT_DB_UID, 12, '0'),4,3) || '/' ||
    substr(LPAD(s.PATIENT_DB_UID, 12, '0'),7,3) || '/' ||
    substr(LPAD(s.PATIENT_DB_UID, 12, '0'),10,3) || '/' ||
    s.STUDY_DB_UID || '/' || i.SERIES_DB_UID || '/'||
    i.RAW_IMAGE_DB_UID || '.img' as FULLY_QUALIFIED_IMAGE_NAME
    , l.image_size
    , i.image_need_backup
    , i.sop_class_uid
    from medistore.didb_studies s
    , medistore.didb_raw_images_table i
    , medistore.didb_image_locations l
    where s.accession_number = 'p1_accno'
    and s.study_db_uid = i.study_db_uid
    and i.raw_image_db_uid = l.raw_image_db_uid
    and l.file_system is not null and INSTR(l.file_system, '.img') = 0
    UNION
    select distinct(l.FILE_SYSTEM) as FULLY_QUALIFIED_IMAGE_NAME
    , l.image_size
    , i.image_need_backup
    , i.sop_class_uid
    from medistore.didb_studies s, medistore.didb_raw_images_table i,
    medistore.didb_image_locations l
    where s.accession_number = 'p1_accno'
    and s.study_db_uid = i.study_db_uid
    and i.raw_image_db_uid = l.raw_image_db_uid
    and l.file_system is not null and INSTR(l.file_system, '.img') > 0
    order by 1;
    BEGIN
    FOR accno_rec in accno_cur LOOP
    DBMS_OUTPUT.put_line('ACCESSION_NUMBER is: '|| accno_rec.accession_number);
    FOR path_rec in path_cur(accno_rec.accession_number) LOOP
    DBMS_OUTPUT.put_line('Inner loop accession_number is :'||accno_rec.accession_number);
    DBMS_OUTPUT.put_line('Full path is : ' || path_rec.FULLY_QUALIFIED_IMAGE_NAME);
    END LOOP;
    END LOOP;
    END;

    Maybe
    DECLARE
      cursor ACCNO_CUR is
        select accession_number
          from didb_studies
         where insert_time > to_date('02-JUN-12');
      cursor PATH_CUR (p1_accno VARCHAR2) is
        select distinct
               l.FILE_SYSTEM || '/' ||
               substr(LPAD(s.PATIENT_DB_UID, 12, '0'),1,3) || '/' ||
               substr(LPAD(s.PATIENT_DB_UID, 12, '0'),4,3) || '/' ||
               substr(LPAD(s.PATIENT_DB_UID, 12, '0'),7,3) || '/' ||
               substr(LPAD(s.PATIENT_DB_UID, 12, '0'),10,3) || '/' ||
               s.STUDY_DB_UID || '/' || i.SERIES_DB_UID || '/'||
               i.RAW_IMAGE_DB_UID || '.img' as FULLY_QUALIFIED_IMAGE_NAME,
               l.image_size,
               i.image_need_backup,
               i.sop_class_uid
          from medistore.didb_studies s,
               medistore.didb_raw_images_table i,
               medistore.didb_image_locations l
         where s.accession_number = to_number(p1_accno) /* to_char(s.accession_number) = p1_accno */
           and s.study_db_uid = i.study_db_uid
           and i.raw_image_db_uid = l.raw_image_db_uid
           and l.file_system is not null
           and INSTR(l.file_system, '.img') = 0
        UNION
        select distinct
               l.FILE_SYSTEM as FULLY_QUALIFIED_IMAGE_NAME,
               l.image_size,
               i.image_need_backup,
               i.sop_class_uid
          from medistore.didb_studies s,
               medistore.didb_raw_images_table i,
               medistore.didb_image_locations l
         where s.accession_number = to_number(p1_accno) /* to_char(s.accession_number) = p1_accno */
           and s.study_db_uid = i.study_db_uid
           and i.raw_image_db_uid = l.raw_image_db_uid
           and l.file_system is not null and INSTR(l.file_system, '.img') > 0
         order by 1;
    BEGIN
      FOR accno_rec in accno_cur
      LOOP
        DBMS_OUTPUT.put_line('ACCESSION_NUMBER is: '|| accno_rec.accession_number);
        FOR path_rec in path_cur(accno_rec.accession_number)
        LOOP
          DBMS_OUTPUT.put_line('Inner loop accession_number is :'||accno_rec.accession_number);
          DBMS_OUTPUT.put_line('Full path is : ' || path_rec.FULLY_QUALIFIED_IMAGE_NAME);
        END LOOP;
      END LOOP;
    END;Regards
    Etbin

  • Oracle 10.1.0.4.2 SQL Plus dbms_output.put_line not working

    I am using Oracle 10.1.0.4.2 SQL Plus, and dbms_output.put_line is not working. It returns the dbms_output ONLY from outside the procedure. I have dbms_output INSIDE my procedure, and none of it gets returned. Please help!
    Here is what I enter:
    set serveroutput on size 1000000;
    DECLARE
         x number:=0;
    begin
    DBMS_OUTPUT.ENABLE;
    c2reports.c2proc(x,'TEST');
    DBMS_OUTPUT.PUT_LINE('testX');
    END;
    testX
    There should be more besides the 'testX' that gets returned. The first line in my procedure has output code to print testY. Thanks in advance!

    This is the forum for the Oracle's SQL Developer (Not for general SQL/PLSQL questions). You should ask question like this in the PL/SQL forum

  • How to print extract value in dbms_output.put_line

    CREATE OR REPLACE PROCEDURE pr_srch_data
    AS
    xml_data_val xmltype:=null;
    vPropertyName clob;
    vstr varchar2(1000);
    operation varchar2(1000);
    vQuery VARCHAR2(4000):=NULL;
    vQry VARCHAR2(4000):=NULL;
    vPartyid VARCHAR2(2000):=NULL;
    vPerson varchar2(4000);
    BEGIN
    FOR I IN (SELECT EAPP_XML_DATA
    FROM binary_xml
    WHERE extractvalue(eapp_xml_data,'/OLifE/Party[@id="Party1"]/Person/LastName') Like 'Rajesh%'
    LOOP
    BEGIN
         SELECT extractvalue(value(t),'/Relation/@RelatedObjectID')
         INTO vPartyid
         FROM TABLE (XMLSEQUENCE (EXTRACT (xml_data_val,'/OLifE/Relation'))) t
         WHERE extractvalue(value(t),'/Relation/RelationRoleCode')='Owner'
    AND existsnode(value(t),'/Relation/@RelatedObjectID')=1 ;
    END;
    SELECT extract(value(t),'/OLifE/Party[@id='''||vPartyid ||''']/Person')
    INTO vPerson
    FROM TABLE (XMLSEQUENCE (EXTRACT (I.EAPP_XML_DATA,'/OLifE')))t;
    dbms_output.put_line('vPerson'||'--'||vPerson);
    END LOOP;
    END;
    But when i am printing vPerson i am getting error. I need to print that extract value.

    Things to remember (that you should know by now)
    Please remind us of which version of 11g you are using in this post and all future posts.
    Look at the FAQ under your sign-in name to see how to use the tag to retain formatting of your code as you have seen our examples to you look like.
    We can't see your screen or your data so how about the error message and some data from your table?
    Please start using either XMLTable or XMLCast/XMLQuery as odie_63 as shown you.
    What are you trying to do?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for

  • Hide Change Layout Button in ALV report o/p for MB52 Tcode

    Hi, Is it possible to Hide Change Layout Button in ALV output for Report MB52 using authoriztaion. We have created a layout in which we are hiding some coloumns which the user should not see. But if the change layout button is active then the user ca

  • How to create a field based on DFF on a Page

    Guys, I do have a page where I do have three user enterable columnn. I want to add one more column on the page that should be based on DFF using personalization. I do not want to click this column and then let it direct to some other region or page.

  • Error while processing conditional formatting formula in crosstab

    This conditional formatting formula must return one of the following Color Constants: ' A number, currency amount, boolean, date, time, date-time, or string is expected here. Details: errorKind The above error is displayed on the the Business Objects

  • Photoshop CC 2014/Portuguese crashes right after it opens

    I installed Photoshop CC 2014/Portuguese on my noteebook Sony Vaio Core i5/2.5GHz/6Gb RAM/64bit OS/Windows 8 Pro/NVIDIA GeForce GT 640M LE, and right after I open it, it shows the following message: "Adobe Photoshop CC 2014 stopped working. A problem

  • How to send a report to corresponding client from the SSRS Report

    Hi Friends, I have one requirement, I have multiple clients information in the report based on the Input client parameter it will show in the report. I want to schedule the report. I need to send a report only with the corresponding client informatio