Refcursor output in sqldeveloper

Hi,
Can you pls let me know how to view the refcursor output using sqldeveloper?
Regards,

Sure.
satyaki>
satyaki>select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE    10.2.0.3.0      Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
Elapsed: 00:00:00.16
satyaki>
satyaki>
satyaki>create or replace procedure gen_cur(str in varchar2,rc in out sys_refcursor)
  2  is  
  3    str1  varchar2(500);
  4  begin  
  5    str1 := 'select empno,ename,hiredate,sal           
  6             from emp           
  7             where '||str;              
  8            
  9    open rc for str1;  
10  exception  
11    when others then    
12      dbms_output.put_line(sqlerrm);
13  end;
14  /
Procedure created.
Elapsed: 00:00:10.03
satyaki>
satyaki>declare
  2   type a is record
  3    (                   
  4      empno    number(4),                   
  5      ename    varchar2(30),                   
  6      hiredate date,                   
  7      sal      number(10,2)                 
  8    ); 
  9   rec a;   
10   b sys_refcursor; 
11   src varchar2(300);
12  begin  
13    src:= 'sal between 2000 and 7000';
14    gen_cur(src,b);  
15    loop    
16      fetch b into rec;     
17      exit when b%notfound;           
18      dbms_output.put_line('Employee No:'||rec.empno||' - '||                          
19                           'Name:'||rec.ename||' - '||                          
20                           'Hire Date:'||rec.hiredate||' - '||                          
21                           'Salary:'||rec.sal);  
22    end loop;  
23    close b;
24  exception  
25    when others then    
26      dbms_output.put_line(sqlerrm);
27  end;
28  /
Employee No:7566 - Name:JONES - Hire Date:02-APR-81 - Salary:2975
Employee No:7698 - Name:BLAKE - Hire Date:01-MAY-81 - Salary:2850
Employee No:7782 - Name:CLARK - Hire Date:09-JUN-81 - Salary:4450
Employee No:7788 - Name:SCOTT - Hire Date:19-APR-87 - Salary:3000
Employee No:7839 - Name:KING - Hire Date:17-NOV-81 - Salary:7000
Employee No:7902 - Name:FORD - Hire Date:03-DEC-81 - Salary:3000
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.61
satyaki>Regards.
Satyaki De.

Similar Messages

  • Redirect the refcursor output of an SP to a table ?

    hi.
    i have an SP which returns a refcursor. now what i need is to get this output to a table so that i can manupulate the data.
    this is how i executed the table
    var a refcursor
    exec packagename.spname(:a,'inputchar');
    print :a;
    please help.
    i tried create table temp as select * from :a
    and
    create table temp as select * from table (cast a as a)
    but both didnt work..
    what am i missing here ????

    novicedba wrote:
    the SP is not mine. so i cannot alter it.So? That does not make something less wrong.
    suppose the refursor returns itemcode, purchase_time, price. and details of 100+ items are returning in thi refcursor. what i need is first to get the results. and then filter it only to view detaild of one item. Why? That cursor does work (in the SQL engine) to find the relevant rows (using indexes and/or tables reading data blocks). It does +"x"+ amount of work to output the results for that SQL select statement.
    Now you want to filter, in PL/SQL or another client language, the output of that cursor. That filtering should be done by the SQL engine - as it is best suited for doing that work. And the workload of +"x"+ that was needed, can now be +"x/2"+ as a result - as the filtering and elimination of columns not needed from the SQL projection can significantly decrease the workload and increase performance.
    So what benefits are there to filter the output of a cursor? NONE! There are no benefits. Not a single one.
    this is why i need to get the Output into a table.The cursor returns data from the SQL engine. This data needs to be pushed from the SGA db buffer cache all the way to the client language. In the case of PL/SQL, into the private heap space of the process (called the PGA).
    Then you take that very same data, create an insert SQL cursor, and send that data back to the SQL engine to be inserted.
    So what benefits are there pushing and pulling SQL data like this across memory and process and even platform boundaries, when the both the read data and write data processes could have been done as a SQL "+insert .. select+" cursor? NONE! There are no benefits. Not a single one.
    (no wonder this sounds like TSQL coz i am more familiar to TSQL than PL ;) (irrelevant stuff) )Treating PL/SQL like TSQL 'cause your are "familiar" with TSQL is, bluntly put, idiotic. PL/SQL is not TSQL. Oracle is not MS-SQL Server.
    if i am going for a cast.. what should i do ?I would go instead for the manuals.. and educate myself on the concepts and fundamentals of the product and languages I'm using. And design and write robust and performant and flexible and scalable code.

  • Problem with IN OUT Number, OUT RefCursor for EF Model StoredProcedure call

    When I call a stored procedure using the EF Model and implicit binding via App.config which has three parameters i.e. 'IN Number', 'IN OUT Number' and 'OUT sys_refcursor', the 'IN OUT Number' is not set correctly on return from the procedure.
    The 'IN OUT Number' is for an error code and is set to 12345 on input and is then set to 54321 by stored proceedure for return.
    The correct value is returned when the call is via OracleCommand using implicit binding via App.config but remains unchanged when the call is via EF Model and implicit binding via App.config.
    The ODP documentaion says you cannot have two OUT RefCursors when using EF Model but does not say you cannot have OUT RefCursor and other non-RefCursor OUT parameters.
    The idea behind this type of procedure is to have multiple input parameters to configure and filter the stored procedure and an output result set that consists of an error code and a collection of result rows in a RefCursor.
    I am using 11g R2 database and ODP 11g Release 2 (11.2.0.2.30) and ODAC Entity Framework beta.
    The query uses Scott/tiger schema with parameters department code, error code and list of employees for department.
    code:
    PROCEDURE TEST_PARAMETERS
    DEPT IN NUMBER,
    ERROR_CODE IN OUT NUMBER,
    DEPT_EMPLOYEES OUT sys_refcursor
    AS
    BEGIN
    DBMS_OUTPUT.PUT_LINE('DEPT = [' || DEPT || ']');
    DBMS_OUTPUT.PUT_LINE('ERROR_CODE = [' || ERROR_CODE || ']');
    OPEN DEPT_EMPLOYEES for SELECT empno, ename from emp where deptno = DEPT;
    -- set ERROR_CODE for return
    ERROR_CODE := 54321;
    END TEST_PARAMETERS;
    The App.config for implicit RefCursor binding is as follows ...
    <oracle.dataaccess.client>
    <settings>
    <add name="SCOTT.TEST_PARAMETERS.RefCursor.DEPT_EMPLOYEES"
    value="implicitRefCursor bindinfo='mode=Output'" />
    <add name="SCOTT.TEST_PARAMETERS.RefCursorMetaData.DEPT_EMPLOYEES.Column.0"
    value="implicitRefCursor metadata='ColumnName=EMPNO;
              BaseColumnName=EMPNO;BaseSchemaName=SCOTT;BaseTableName=EMP;
              NATIVE_DATA_TYPE=number;ProviderType=Int32;
              PROVIDER_DB_TYPE=Int32;DataType=System.Int32;
              ColumnSize=4;NumericPrecision=10;
                   NumericScale=3;AllowDBNull=false;IsKey=true'" />
    <add name="SCOTT.TEST_PARAMETERS.RefCursorMetaData.DEPT_EMPLOYEES.Column.1"
    value="implicitRefCursor metadata='ColumnName=ENAME;
              BaseColumnName=ENAME;BaseSchemaName=SCOTT;BaseTableName=EMP;
              NATIVE_DATA_TYPE=varchar2;ProviderType=Varchar2;
              PROVIDER_DB_TYPE=String;DataType=System.String;
              ColumnSize=10;AllowDBNull=true'" />
    </settings>
    </oracle.dataaccess.client>
    When the call is via OracleCommand both outputs are correct i.e. ERROR_CODE gets set to 54321 and the correct emplyees for department 10 are returned
    code:
    private void TestParametersViaOracleCommand()
    try
    string constr = "DATA SOURCE=ORCL;PASSWORD=tiger;PERSIST SECURITY INFO=True;USER ID=SCOTT";
    OracleConnection con = new OracleConnection(constr);
    con.Open();
    OracleCommand cmd = con.CreateCommand();
    OracleDataAdapter adapter = new OracleDataAdapter(cmd);
    DataSet ds = new DataSet();
    cmd = con.CreateCommand();
    cmd.CommandText = "SCOTT.TEST_PARAMETERS";
    cmd.CommandType = CommandType.StoredProcedure;
    cmd.BindByName = true;
    OracleParameter dept = cmd.Parameters.Add("DEPT",
    OracleDbType.Int32,
    ParameterDirection.Input);
    dept.Value = 10;
    OracleParameter errorCode = cmd.Parameters.Add("ERROR_CODE",
    OracleDbType.Int32,
    ParameterDirection.InputOutput);
    errorCode.Value = 12345;
    // RefCursor output parameter implicitly bound via App.Config
    adapter = new OracleDataAdapter(cmd);
    adapter.Fill(ds);
    // should be 54321 and is ...
    Console.WriteLine("after call errorCode.Value = " + errorCode.Value);
    Console.WriteLine("list size = {0}", ds.Tables[0].Rows.Count);
    // only one table
    DataTable deptEmployeesTable = ds.Tables[0];
    for (int ii = 0; ii < deptEmployeesTable.Rows.Count; ++ii)
    DataRow row = deptEmployeesTable.Rows[ii];
    Console.WriteLine("EMPNO: " + row[0] + "; ENAME: " + row[1]);
    catch (Exception ex)
    // Output the message
    Console.WriteLine(ex.Message);
    if (ex.InnerException != null)
    // If any details are available regarding
    // errors in the app.config, print them out
    Console.WriteLine(ex.InnerException.Message);
    if (ex.InnerException.InnerException != null)
    Console.WriteLine(
    ex.InnerException.InnerException.Message);
    output:
    before call errorCode.Value = 12345
    after call errorCode.Value = 54321 (should be 54321!)
    list size = 3
    EMPNO: 7782; ENAME: CLARK
    EMPNO: 7839; ENAME: KING
    EMPNO: 7934; ENAME: MILLER
    However when call is via EF Model the correct employees are returned but the ERROR_CODE parameter is unchanged on return.
    code:
    private void TestParametersViaEFModel()
    var context = new ScottEntities();
    Decimal dept = 10;
    ObjectParameter errorCodeParameter = new ObjectParameter("ERROR_CODE", typeof(decimal));
    errorCodeParameter.Value = 12345;
    Console.WriteLine("before call errorCodeParameter.Value = " + errorCodeParameter.Value);
    // RefCursor output parameter implicitly bound via App.Config
    var queryResult = context.TestParameters(dept, errorCodeParameter);
    // should be 54321 and is ...
    Console.WriteLine("after call errorCodeParameter.Value = " + errorCodeParameter.Value + " (should be 54321!)");
    List<TestParameters_Result> deptEmployeesList = queryResult.ToList();
    Console.WriteLine("list size = {0}", deptEmployeesList.Count);
    for (int ii = 0; ii < deptEmployeesList.Count; ++ii)
    TestParameters_Result result = deptEmployeesList[ii];
    Console.WriteLine("EMPNO: " + result.EMPNO + "; ENAME: " + result.ENAME);
    output:
    after call errorCodeParameter.Value = 12345 (should be 54321!)
    list size = 3
    EMPNO: 7782; ENAME: CLARK
    EMPNO: 7839; ENAME: KING
    EMPNO: 7934; ENAME: MILLER
    errorCodeParameter.Value IS NOT CORRECTLY RETURNED!
    If there is no RefCursor then both outputs are identical i.e. the parameters are being passed in correctly and the problem is not with the 'IN OUT' parameter. Also same thing is true if ERROR_CODE is made an OUT parameter. Also tried changing the position of the parameter in the list but still get same problem i.e. works when OracleCommand but not when EF Model. Also note that the RefCursor results are correct for both types of call i.e. it is just a problem with the value of the 'IN OUT ERROR_CODE' parameter.
    I have also enabled debug stepping from Visual Studio 2010 into Oracle PL/SQL as described in
    "http://st-curriculum.oracle.com/obe/db/hol08/dotnet/debugging/debugging_otn.htm"
    and have verified by inspection that the correct values are being passed into the stored procedure and that the stored procedure is definitely setting the ERROR_CODE to 54321 prior to return.
    Most of our stored procedures have these type of parameters i.e. several IN params to configure the work of the stored procedure, an OUT NUMBER parameter for the Error_Code if any and a RefCursor for the result list.
    Is this a bug or a feature? Am I doing something wrong?

    Just to clarify ....
    If the ERROR_CODE parameter is made an 'OUT' parameter instead of an 'IN OUT' parameter the correct return value is given for the OracleCommand invocation but the WRONG value is still returned for the EF Model invocation i.e. just changing the parameter from 'IN OUT' to just 'OUT' does not fix the problem.

  • Still not possible (4.0 EA3) to copy displayed column headings from ref cursor output.

    Hi,
    I've created an enhancement request to allow displayed column headings from ref_cursor output to be copied.
    This is still not possible (4.0 EA3)
    The ref cursor data can be copied, but not the headings..
    See July 2012 discussion of problem in comments at
    http://www.thatjeffsmith.com/archive/2011/12/sql-developer-tip-viewing-refcursor-output/

    Hi,
    I think you're out of luck... except if you're on 11g where you can use DBMS_SQL.TO_CURSOR_NUMBER to convert the REF CURSOR to a DBMS_SQL cursor, and then benefit from the DBMS_SQL package to get column details.
    http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/d_sql.htm#CHDJDGDG

  • How to set a column size in sqldeveloper?

    Like in subject.. I want to set standard output in sqldeveloper, but this command doesn't work:
    column object_name Heading 'name' format a40
    Someone know where it should be set?
    I think about "Script output" of course!! Not any graphical one ;)
    Message was edited by:
    user584507

    The statement column is not supported in SQL Developer.
    See Help > SQL Developer Concepts and Usage > Using the SQL Worksheet > SQL*Plus Statements Supported and Not Supported in SQL Worksheet.
    But you can use substr in the select statement to set the column width.
    For example:
    select substr(object_name,1,40) "Object", object_name
    from user_objects
    Run the statement as a script and see the difference between both columns.

  • Call a procedure that returns a refcursor, use it in another proc's sql?

    I have a procedure that returns a refcursor; how can I include that refcursor in a sql statement that's in another procedure, or view etc?
    This is the kind of foolery I've tried so far (myproc1 returns a ref cursor):
    create or replace procedure myproc2
    rc ref cursor
    AS
    rc1 ref cursor;
    begin
    EXECUTE myproc1(rc1);
    open rc for
    select rc1.* from rc1;
    end myproc2;

    lecaro wrote:
    To reiterate, I was interested in consuming the refcursor output of one proc in another proc. I wanted to take what I regarded as the records returned by the first sproc and manipulate them using SQL in the second sproc.
    Since I can't use that approach, what are some hopefully fairly straightforward solutions that might work?Something like:
    create or replace
      procedure p1(
                   p_stmt varchar2,
                   p_refcursor OUT sys_refcursor
        is
        begin
            open p_refcursor for p_stmt;
    end;
    create or replace
      procedure p2(
                   p_stmt varchar2
        is
            v_refcursor sys_refcursor;
            v_var varchar2(30);
        begin
            p1(p_stmt,v_refcursor);
            loop
              fetch v_refcursor into v_var;
              exit when v_refcursor%notfound;
              dbms_output.put_line(v_var);
            end loop;
    end;
    set serveroutput on
    exec p2('select ename from emp where deptno = 20');
    SQL> set serveroutput on
    SQL> exec p2('select ename from emp where deptno = 20');
    SMITH
    JONES
    SCOTT
    ADAMS
    FORD
    PL/SQL procedure successfully completed.
    SQL> SY.

  • RefCursor Mapping

    Anybody know how to map the output of a refcursor to a file via the transform? We have been playing with modifying the xsl to get it to loop and set the values, but it doesn't seem to output the way we would want it too.
    So if we have a refcursor that outputs 25 rows and 4 columns I would expect to be able to map those 4 columns to a file or another insert, etc.
    The refcursor output is completely different then dropping in a select. It doesn't create the collection with the column values.
    Thanks,
    S

    Anybody use refcursors to pull data using BPEL? If not how do you pull data from the dbs? Just usuing custom SQL?

  • Performance with multiple out refcursors

    Hello,
    I've created a sp with 10 output refcursors, it is actually to fetch Programinfo from the database.
    earlier i had used 4-5 seperate sp's and called them from C# code, and it was taking abt 70-100 millisec to fetch one program.
    Now i wanted to improve the performance, and i tried to create a simgle sp which has 10 output refcursors, now this is taking abt 110-1125 ms to fetch one program.
    i'm pasting below the new sp i've writtten, please let me know how I can imprrve the performance, please help me, thanks - shruti
    PROCEDURE "CPADMIN"."CPX_SP_FETCH_PROGRAMINFO_N" (
    "I_PROGRAMID" IN NUMBER,
    "I_VERSION" IN NUMBER,
    "O_REFCUR" OUT SYS_REFCURSOR,
    "O_REFCUR1" OUT SYS_REFCURSOR,
    "O_REFCUR2" OUT SYS_REFCURSOR,
    "O_REFCUR3" OUT SYS_REFCURSOR,
    "O_REFCUR4" OUT SYS_REFCURSOR,
    "O_REFCUR5" OUT SYS_REFCURSOR,
    "O_REFCUR6" OUT SYS_REFCURSOR,
    "O_REFCUR7" OUT SYS_REFCURSOR,
    "O_REFCUR8" OUT SYS_REFCURSOR,
    "O_REFCUR9" OUT SYS_REFCURSOR
    ) IS
    -- SP Name : CPX_SP_FETCH_PROGRAMINFO
    -- Description : Fetches program Info by ProgramID
    -- Input Param : I_PROGRAMID - EventID
    --                    I_VERSION - Program Version
    -- Output Param : O_REFCUR - refcursor
    -- Output Param : O_REFCUR1 - refcursor for final languages
    -- Output Param : O_REFCUR2 - refcursor for genre
    -- Output Param : O_REFCUR3 - refcursor for category
    -- Output Param : O_REFCUR4 - refcursor for numeric fields
    -- Output Param : O_REFCUR5 - refcursor for date fields
    -- Output Param : O_REFCUR6 - refcursor for credit language id
    -- Output Param : O_REFCUR7 - refcursor for credits data
    -- Output Param : O_REFCUR8 - refcursor for credits data
    -- Output Param : O_REFCUR9 - refcursor for credits data
    -- Tables : CPX_Program, CPX_PROGRAM_VERSION
    -- Created By : Shruti Lalwani - 24Jan2008
    -- Change History : shruti lalwani - 26 Mar 2008
    -- removed the LanguageId input param
    intCnt number;
    intIsFinal number;
    intPVersion number;
    intLVersion number;
    strLanguage varchar2(100);
    intSchCnt number;
    BEGIN -- executable part starts here
    if I_VERSION > 0 then
         -- get the particular version from cpx_program_version
         select count(*) into intCnt
         from CPX_PROGRAM Prg
         inner join CPX_PROGRAM_VERSION PrgV on Prg.ID=PrgV.Program_ID
         and Prg.ID = I_PROGRAMID
         and PrgV.VErsion = I_VERSION;
         if intCnt > 0 then
              open o_refcur for
              select Prg.ID as ProgramID, Prg.Type_ID as PrgType,
              PrgV.VErsion as ProgramVersion, Prg.Schedule_Only, Prg.Origin, Prg.Status_ID as StatusId,
              nvl(Prg.IN_USE_BY,0) as IN_USE_BY_ID,
              nvl((select Usr.Display_Name from CPX_User Usr where ID= Prg.IN_USE_BY),' ') as IN_USE_BY_NAME,
              nvl(in_use_since,TO_DATE('1-Jan-1970','DD-MON-YY HH:MI:SS AM')) as In_Use_since, Prg.Latest_Version as Latest_Version
              --in_use_since as In_Use_since, Prg.Latest_Version as Latest_Version
              from CPX_PROGRAM Prg
              inner join CPX_PROGRAM_VERSION PrgV on Prg.ID=PrgV.Program_ID
              and Prg.ID = I_PROGRAMID
              and PrgV.VErsion = I_VERSION;
              open o_refcur1 for
              select DISTINCT PrgContT.Language_ID as LanguageID
              from CPX_PROGRAM Prg
              inner join CPX_PROGRAM_CONTENT_TEXT PrgContT on Prg.ID = PrgContT.Program_ID
              and PrgContT.Program_version = (case when I_VERSION > 0 then I_VERSION else Prg.Latest_version end)
              and Prg.ID = I_PROGRAMID
              and PrgContT.Language_id >= 0;
              open o_refcur2 for
              select PrgText.Field_Id as FieldID, PrgText.Content as Content, PrgText.Variant_Id as VariantId,PrgText.Language_ID as Language_ID
              from CPX_Program_Content_Text PrgText
              inner join CPX_PROGRAM_VERSION PrgV on PrgV.Program_Id = PrgText.Program_Id
              inner join CPX_PROGRAM Prg on Prg.Id= PrgV.Program_Id
              inner join CPX_Language lang on PrgText.Language_Id= lang.ID
              and PrgV.Version = PrgText.Program_version
              and Prg.Id= I_PROGRAMID and PrgV.Version = I_VERSION
              order by PrgText.Language_ID, FieldId asc;
              select schedule_only into intSchCnt
              from CPX_PROGRAM Prg
              inner join CPX_PROGRAM_VERSION PrgV on Prg.ID=PrgV.Program_ID
              and Prg.ID = I_PROGRAMID
              and PrgV.VErsion = I_VERSION;
              -- fetch only for real program
              if intSchCnt = 0 then
                   open o_refcur3 for
                   select language_id, version
                   from CPx_PROGRAM_LANGUAGE_STATUS
                   where program_id = I_PROGRAMID and version > 0;
                   open o_refcur4 for
                   select      PrgG.Genre_Id as GenreID
                   from CPX_PROGRAM Prg
                   inner join CPX_PROGRAM_VERSION PrgV on Prg.ID=PrgV.Program_ID
                   inner join CPX_PROGRAM_GENRE PrgG on PrgG.Program_id = Prg.ID
                   and Prg.ID = I_PROGRAMID
                   and PrgV.VErsion = I_VERSION
                   and PrgG.Program_version = PrgV.VErsion;
                   open o_refcur5 for
                   select PrgCat.Category_Id as CategoryID
                   from CPX_PROGRAM Prg
                   inner join CPX_PROGRAM_CATEGORY PrgCat on Prg.ID = PrgCat.Program_ID
                   and PrgCat.Program_version = (case when I_VERSION > 0 then I_VERSION else Prg.Latest_version end)
                   and Prg.ID = I_PROGRAMID;
                   open O_RefCur6 for
                   select PrgNum.Field_Id as FieldID, PrgNum.Content as Content, PrgNum.Variant_Id as VariantId
                   from CPX_Program_Content_Number PrgNum
                   inner join CPX_PROGRAM_VERSION PrgV on PrgV.Program_Id = PrgNum.Program_Id
                   inner join CPX_PROGRAM Prg on Prg.Id= PrgV.Program_Id
                   and PrgV.Version = PrgNum.Program_version
                   and Prg.Id= I_PROGRAMID and PrgV.Version = I_VERSION
                   order by FieldId asc;
                   open O_RefCur7 for
                   select PrgDate.Field_Id as FieldID, PrgDate.Content as Content
                   from CPX_Program_Content_Date PrgDate
                   inner join CPX_PROGRAM_VERSION PrgV on PrgV.Program_Id = PrgDate.Program_Id
                   inner join CPX_PROGRAM Prg on Prg.Id= PrgV.Program_Id
                   and PrgV.Version = PrgDate.Program_version
                   and Prg.Id= I_PROGRAMID and PrgV.Version = I_VERSION
                   order by FieldId asc;
                   open o_refcur8 for
                   select DISTINCT PrgCredit.Language_ID as LanguageID
                   from CPX_PROGRAM PRg
                   inner join CPX_PROGRAM_CREDIT PrgCredit on Prg.ID = PrgCredit.Program_ID
                   and PrgCredit.Program_version = (case when I_VERSION > 0 then I_VERSION else Prg.Latest_version end)
                   and Prg.ID = I_PROGRAMID
                   and PrgCredit.Language_id >= 0;
                   open O_RefCur9 for
                   select PrgCr.Role_Id as RoleID, PrgCr.Person_Id as PersonID, PrgCr.character as Character,
                   PrgCr.Sequencenr as Sequencenr, Person.first_name as First_Name , Person.Last_Name as Last_Name,Language_ID
                   from CPX_Program_Credit PrgCr
                   inner join CPX_PROGRAM_VERSION PrgV on PrgV.Program_Id = PrgCr.Program_Id
                   inner join CPX_PROGRAM Prg on Prg.Id= PrgV.Program_Id
                   inner join CPX_Person Person on PrgCr.Person_ID = Person.ID
                   and PrgV.Version = PrgCr.Program_version
                   and Prg.Id= I_PROGRAMID and PrgV.Version = I_VERSION
                   order by PrgCr.Language_ID,PrgCr.Sequencenr asc;
              end if;
         end if;
    else
         -- get the latest version from cpx_program
         if I_VERSION = -1 then
              select count(*) into intCnt
              from CPX_PROGRAM Prg
              inner join CPX_PROGRAM_VERSION PrgV on Prg.ID=PrgV.Program_ID
              and Prg.Latest_Version = PrgV.Version
              and Prg.ID = I_PROGRAMID;
              if intCnt > 0 then
                   open o_refcur for
                   select Prg.ID as ProgramID, Prg.Type_ID as PrgType,
                   Prg.Latest_VErsion as ProgramVersion, Prg.Schedule_Only, Prg.Origin, Prg.Status_ID as StatusId,
                   nvl(Prg.IN_USE_BY,0) as IN_USE_BY_ID,
                   nvl((select Usr.Display_Name from CPX_User Usr where ID= Prg.IN_USE_BY),' ') as IN_USE_BY_NAME,
                   nvl(in_use_since,TO_DATE('1-Jan-1970','DD-MON-YY HH:MI:SS AM')) as In_Use_since, Prg.Latest_Version as Latest_Version
              --in_use_since as In_Use_since, Prg.Latest_Version as Latest_Version               
              from CPX_PROGRAM Prg
                   inner join CPX_PROGRAM_VERSION PrgV on Prg.ID=PrgV.Program_ID
                   and Prg.Latest_Version = PrgV.VErsion
                   and Prg.ID = I_PROGRAMID;
                   open o_refcur1 for
                   select DISTINCT PrgContT.Language_ID as LanguageID
                   from CPX_PROGRAM Prg
                   inner join CPX_PROGRAM_CONTENT_TEXT PrgContT on Prg.ID = PrgContT.Program_ID
                   and PrgContT.Program_version = (case when I_VERSION > 0 then I_VERSION else Prg.Latest_version end)
                   and Prg.ID = I_PROGRAMID
                   and PrgContT.Language_id >= 0;
                   open o_refcur2 for
                   select PrgText.Field_Id as FieldID, PrgText.Content as Content, PrgText.Variant_Id as VariantId,PrgText.Language_ID as Language_ID
                   from CPX_Program_Content_Text PrgText
                   inner join CPX_PROGRAM_VERSION PrgV on PrgV.Program_Id = PrgText.Program_Id
                   inner join CPX_PROGRAM Prg on Prg.Id= PrgV.Program_Id
                   inner join CPX_Language lang on PrgText.Language_Id= lang.ID
                   and Prg.Latest_Version = PrgV.Version
                   and PrgV.Version = PrgText.Program_version
                   and Prg.Id= I_PROGRAMID
                   order by PrgText.Language_ID, FieldId asc;
                   select schedule_only into intSchCnt
                   from CPX_PROGRAM Prg
                   inner join CPX_PROGRAM_VERSION PrgV on Prg.ID=PrgV.Program_ID
                   and Prg.Latest_Version = PrgV.VErsion
                   and Prg.ID = I_PROGRAMID;
                   -- fetch only for real program
                   if intSchCnt = 0 then
                        open o_refcur3 for
                        select language_id, version
                        from CPx_PROGRAM_LANGUAGE_STATUS
                        where program_id = I_PROGRAMID and version > 0;
                        open o_refcur4 for
                        select      PrgG.Genre_Id as GenreID
                        from CPX_PROGRAM Prg
                        inner join CPX_PROGRAM_VERSION PrgV on Prg.ID=PrgV.Program_ID
                        inner join CPX_PROGRAM_GENRE PrgG on PrgG.Program_id = Prg.ID
                        and Prg.Latest_Version = PrgV.Version
                        and PrgG.Program_version = PrgV.VErsion
                        and Prg.ID = I_PROGRAMID;
                        open o_refcur5 for
                        select PrgCat.Category_Id as CategoryID
                        from CPX_PROGRAM Prg
                        inner join CPX_PROGRAM_CATEGORY PrgCat on Prg.ID = PrgCat.Program_ID
                        and PrgCat.Program_version = (case when I_VERSION > 0 then I_VERSION else Prg.Latest_version end)
                        and Prg.ID = I_PROGRAMID;
                        open O_RefCur6 for
                        select PrgNum.Field_Id as FieldID, PrgNum.Content as Content, PrgNum.Variant_Id as VariantId
                        from CPX_Program_Content_Number PrgNum
                        inner join CPX_PROGRAM_VERSION PrgV on PrgV.Program_Id = PrgNum.Program_Id
                        inner join CPX_PROGRAM Prg on Prg.Id= PrgV.Program_Id
                        and Prg.Latest_Version = PrgV.Version
                        and PrgV.Version = PrgNum.Program_version
                        and Prg.Id= I_PROGRAMID
                        order by FieldId asc;
                        open O_RefCur7 for
                        select PrgDate.Field_Id as FieldID, PrgDate.Content as Content
                        from CPX_Program_Content_Date PrgDate
                        inner join CPX_PROGRAM_VERSION PrgV on PrgV.Program_Id = PrgDate.Program_Id
                        inner join CPX_PROGRAM Prg on Prg.Id= PrgV.Program_Id
                        and Prg.Latest_Version = PrgV.Version
                        and PrgV.Version = PrgDate.Program_version
                        and Prg.Id= I_PROGRAMID
                        order by FieldId asc;
                        open o_refcur8 for
                        select DISTINCT PrgCredit.Language_ID as LanguageID
                        from CPX_PROGRAM PRg
                        inner join CPX_PROGRAM_CREDIT PrgCredit on Prg.ID = PrgCredit.Program_ID
                        and PrgCredit.Program_version = (case when I_VERSION > 0 then I_VERSION else Prg.Latest_version end)
                        and Prg.ID = I_PROGRAMID
                        and PrgCredit.Language_id >= 0;
                        open O_RefCur9 for
                        select PrgCr.Role_Id as RoleID, PrgCr.Person_Id as PersonID, PrgCr.character as Character,
                        PrgCr.Sequencenr as Sequencenr,Person.first_name as First_Name , Person.Last_Name as Last_Name, Language_ID
                        from CPX_Program_Credit PrgCr
                        inner join CPX_PROGRAM_VERSION PrgV on PrgV.Program_Id = PrgCr.Program_Id
                        inner join CPX_PROGRAM Prg on Prg.Id= PrgV.Program_Id
                        inner join CPX_Person Person on PrgCr.Person_ID = Person.ID
                        and Prg.Latest_Version = PrgV.Version
                        and PrgV.Version = PrgCr.Program_version
                        and Prg.Id= I_PROGRAMID
                        order by PrgCr.Language_ID,PrgCr.Sequencenr asc;
              end if;
              end if;
         end if;
    end if;
    END "CPX_SP_FETCH_PROGRAMINFO_N";

    This is remarkably ugly from the standpoint of fetching all of this information using separate REF CURSORS because you seem to be hitting the same tables, for example "CPX_PROGRAM," again and again and again. Why not hit the tables once, load an interim result set into an array and then use that subset of your table data to then extract what you need?

  • Upraded Sql Developer and can't connect to Oracle

    I just updated to the Dec 2009 release and now I can't connect
    When I click the plus or right click on Connections and select "New Connection" nothing happens.
    If I monitor processes in task manager it shows a brief spike in cpus and a small increase in memory usage but nothing happens in the app.
    I also noticed that when I close the application it does not leave memory. I have to kill the process via the task manager to get rid of it.
    If I go back to version 1.5.1 it works fine. It also leaves memory when terminated
    Using winxp r3.

    Here is the beginning of the output:
    E:\sqldeveloper\sqldeveloper\bin>sqldeveloper
    Feb 24, 2010 8:30:27 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/E:/sqldeveloper/sqldeveloper/extensions/oracle.sqldeveloper.snippet.jar!/META-INF/extension.xml:16: Duplicate declaration of addin
    oracle.dbtools.raptor.snippet.SnippetAddin. Previously defined in extension oracle.dbdev.snippet
    Feb 24, 2010 8:30:27 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/E:/sqldeveloper/sqldeveloper/extensions/oracle.sqldeveloper.snippet.jar!/META-INF/extension.xml:17: Duplicate declaration of addin
    oracle.dbtools.raptor.snippet.SaveSnippetAddin. Previously defined in extension oracle.dbdev.snippet
    Feb 24, 2010 8:30:27 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/E:/sqldeveloper/sqldeveloper/extensions/oracle.sqldeveloper.migration.jar!/META-INF/extension.xml:16: Duplicate declaration of addi
    n oracle.dbtools.migration.workbench.core.MigrationAddin. Previously defined in extension oracle.dbtools.migration
    Feb 24, 2010 8:30:27 AM javax.ide.extension.spi.SAXManifestParser$Handler endElement
    SEVERE: jar:/file:/E:/sqldeveloper/sqldeveloper/extensions/oracle.sqldeveloper.migration.jar!/META-INF/extension.xml:22: Exception processing manifest
    : java.lang.NumberFormatException:For input string: "VIEW_CATEGORY_MENU"
    java.lang.NumberFormatException: For input string: "VIEW_CATEGORY_MENU"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    at java.lang.Integer.parseInt(Integer.java:447)
    at java.lang.Integer.parseInt(Integer.java:497)
    at oracle.ide.util.ArrayResourceBundle.handleGetObject(ArrayResourceBundle.java:495)
    at java.util.ResourceBundle.getObject(ResourceBundle.java:378)
    at java.util.ResourceBundle.getString(ResourceBundle.java:344)
    Here is a snip from partway down:
    Exception initializing 'oracle.jdevimpl.runner.profile.ProfilerShell' in extension 'Database Developer': oracle.classloader.util.AnnotatedNoClassDefFo
    undError:
    Missing class: oracle.jdevimpl.runner.profile.ProfArb
    Dependent class: oracle.jdevimpl.runner.profile.ProfilerShell
    Loader: ide-global:11.1.1.0.0
    Code-Source: /E:/sqldeveloper/jdev/extensions/oracle.onlinedb.jar
    Configuration: extension jar in E:\sqldeveloper\jdev\extensions
    The missing class is not available from any code-source or loader in the system.
    at oracle.classloader.PolicyClassLoader.handleClassNotFound (PolicyClassLoader.java:2180) [/E:/sqldeveloper/modules/oracle.classloader_11.1.1.
    jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@24216257]
    at oracle.classloader.PolicyClassLoader.internalLoadClass (PolicyClassLoader.java:1733) [/E:/sqldeveloper/modules/oracle.classloader_11.1.1.ja
    r (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@24216257]
    at oracle.classloader.PolicyClassLoader.access$000 (PolicyClassLoader.java:143) [/E:/sqldeveloper/modules/oracle.classloader_11.1.1.jar (from
    system property java.class.path), by sun.misc.Launcher$AppClassLoader@24216257]
    at oracle.classloader.PolicyClassLoader$LoadClassAction.run (PolicyClassLoader.java:331) [/E:/sqldeveloper/modules/oracle.classloader_11.1.1.j
    ar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@24216257]
    at java.security.AccessController.doPrivileged (Native method) [unknown, by unknown]
    at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1692) [/E:/sqldeveloper/modules/oracle.classloader_11.1.1.jar (from
    system property java.class.path), by sun.misc.Launcher$AppClassLoader@24216257]
    at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1674) [/E:/sqldeveloper/modules/oracle.classloader_11.1.1.jar (from
    system property java.class.path), by sun.misc.Launcher$AppClassLoader@24216257]
    at java.lang.ClassLoader.loadClassInternal (ClassLoader.java:320) [jre bootstrap, by jre.bootstrap:1.6.0_10]
    at oracle.jdevimpl.runner.profile.ProfilerShell.createRunMenuItem (ProfilerShell.java:193) [/E:/sqldeveloper/jdev/extensions/oracle.onlinedb.j
    ar (from extension jar in E:\sqldeveloper\jdev\extensions), by ide-global:11.1.1.0.0]
    There are around 500 lines of output none of which tells me what is wrong

  • How to use a stored procedure as a datasource in Crystal Report for Eclipse

    Hi All,
    I've written a stored procedure in oracle 10g with few input parameters and one refcursor output parameter. I want to use this stored procedure as a data source for creating a report in "Crystal Report For Eclipse 3.6.0".
    When I tried to add this stored procedure to the report using the connection explorer, I don't see any option to do this. But when I try to add any table, it shows options like "Add to the current report"....
    Can anybody assist me how to use a stored procedure as a data source in "Crystal Report For Eclipse"?
    Which driver should I use to connect to the oracle database? I tried using JDBC Driver for Oracle.
    Thanks in advance.

    Did you solve your problem? How did you do?

  • Problem to call stored procedure with several IN pars and single REF Cursor

    Hi,
    Oracle 9.2.0.1
    Ole DB Provider I've got with ODP 9.2.0.4
    First I try to call packaged procedure with single
    REF CURSOR - it works fine(PROCEDURE getDep(dep OUT DEPART.refcur) IS ...).
    When I try to call procedure with additional IN parameter, I get an error ORA-01008: not all variables bound.
    Packaged procedure: PROCEDURE getDep(dep OUT DEPART.refcur, i1 IN number) IS .... and so on.
    Try to call from C#:
    cmd.CommandText = "{call depart.getDep(?)}";
    OleDbParameter par0 = cmd.CreateParameter();
    par0.Value = some value;
    par0.DbType = DbType.Int16;
    par0.OleDbType = OleDbType.Integer;
    par0.Direction = ParameterDirection.Input;
    OleDbDataAdapter da = new OleDbDataAdapter(cmd.CommandText,con);
    DataSet ds = new DataSet();
    da.Fill(ds);
    Connection string:
    "Provider=OraOLEDB.Oracle;User Id=scott;Password=tiger;Data Source=ora92;OLEDB.NET=true;PLSQLRSet=true"
    Please, HELP !
    Thanks in advance,
    Vyacheslav

    Hi,
    Are you using OLEDB.NET driver (System.Data.Oledb) or ODP.NET driver (Oracle.DataAccess)?
    If you are using ODP.NET, remember that you need to bind the refcursor output variable also (besides the numbder)
    Arnold

  • BULK COLLECT in select query inside a function

    Hi All,
    My query is :
    SELECT col1,col2,col3 FROM table_a; --( consider this is a long running query with lot of joins)
    Need to know how can i get the output of the above query from a function using BULK COLLECT.
    and i tried this:
    CREATE OR REPLACE TYPE tab_a_row
    AS OBJECT (
    col1 number(20),
    col2 number(20),
    col2 number(20)) ;
    create or replace type tab_a_nt as table of tab_a_row;
    create or replace function get_table_a
    return sys_refcursor
    is
    tab_a_recs tab_a_nt;
    rv sys_refcursor;
    begin
    SELECT tab_a_row(col1,col2,col3) BULK COLLECT INTO tab_a_recs FROM table_a;
    open rv for select * from table(tab_a_recs);
    return rv;
    end;
    Function created successfully. and i exec this from sql plus using
    SQL> var rc refcursor;
    SQL> exec :rc := get_table_a;
    BEGIN :rc := get_table_a; END;
    ERROR at line 1:
    ORA-22905: cannot access rows from a non-nested table item
    ORA-06512: at "GET_TABLE_A", line 12
    ORA-06512: at line 1
    Kindly share your ideas on how to use bulk collect and get set of outputs from a function.
    Edited by: 887268 on Apr 18, 2013 3:10 AM

    >
    If i use refcursor , then the JAVA code needs to be changed accordinglyto get the refcursor output.
    >
    Well, of course. Java has to know what the sql projection is. How else will it know how many columns there are and their datatypes.
    But that is true no matter what method you use.
    >
    But if i use a PLSQL COLLECTION TYPE (nested tables ) , then i can get output as ,
    select * from table(function_name(input1,input2));
    >
    No - using the 'table' function mean you are calling a PIPELINED function.
    This is a sample of a PIPELINED procedure.
    -- type to match emp record
    create or replace type emp_scalar_type as object
      (EMPNO NUMBER(4) ,
       ENAME VARCHAR2(10),
       JOB VARCHAR2(9),
       MGR NUMBER(4),
       HIREDATE DATE,
       SAL NUMBER(7, 2),
       COMM NUMBER(7, 2),
       DEPTNO NUMBER(2)
    -- table of emp records
    create or replace type emp_table_type as table of emp_scalar_type
    -- pipelined function
    create or replace function get_emp( p_deptno in number )
      return emp_table_type
      PIPELINED
      as
       TYPE EmpCurTyp IS REF CURSOR RETURN emp%ROWTYPE;
        emp_cv EmpCurTyp;
        l_rec  emp%rowtype;
      begin
        open emp_cv for select * from emp where deptno = p_deptno;
        loop
          fetch emp_cv into l_rec;
          exit when (emp_cv%notfound);
          pipe row( emp_scalar_type( l_rec.empno, LOWER(l_rec.ename),
              l_rec.job, l_rec.mgr, l_rec.hiredate, l_rec.sal, l_rec.comm, l_rec.deptno ) );
        end loop;
        return;
      end;
    select * from table(get_emp(20))Or your function could return a collection like the example from this thread this morning.
    Example of Collection as datatype of a function’s return value
    CREATE OR REPLACE TYPE enamelist as VARRAY(20) of VARCHAR2(20)
    /* Formatted on 4/18/2013 4:06:47 PM (QP5 v5.126.903.23003) */
    CREATE OR REPLACE FUNCTION ename_fn
    RETURN enamelist
    AS
    v_cursor_main enamelist := enamelist ();
    BEGIN
    SELECT ename
    BULK COLLECT
    INTO v_cursor_main
    FROM emp;
    RETURN v_cursor_main;
    EXCEPTION
    WHEN OTHERS
    THEN
    RETURN v_cursor_main;
    END;
    select * from table(ename_fn()) from dual;
    COLUMN_VALUE
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    JAMES
    FORD
    MILLER

  • SQL Developer 1.1 Crash on connecting

    Hello,
    I have a TNS type connection defined which uses the default role and a connect identifier rather than a network alias. When I click test I get a success message but when I click connect then SQL developer waits for a few seconds and then crashes (no error message displayed). Can anyone suggest where to start looking for the cause of this?
    Regards
    Alastair
    Message was edited by:
    Alastair Green
    Just found an earlier post that mentioned launching from the console. This gives me the following output:
    C:\SQLDeveloper\sqldeveloper\sqldeveloper\bin>sqldeveloper
    WARNING: Unknown directive: SetSkipJ2SDKCheck
    Using oracle.home=C:\SQLDeveloper\sqldeveloper
    Using ide.user.dir=null
    Addin: Translator PlSql is trying to register a input type (.plsql) which confli
    cts with translator PlSql who already using this input type
    Exception while updating action Copy
    java.lang.ClassCastException: ice.pilots.image.ThePilot
    at oracle.help.htmlBrowser.ICEBrowser._getThePilot(Unknown Source)
    at oracle.help.htmlBrowser.ICEBrowser.getSelectedText(Unknown Source)
    at oracle.jdevimpl.help.HelpContentPanel.isTextSelected(HelpContentPanel
    .java:485)
    at oracle.jdevimpl.help.HelpTopicEditor$HelpTopicEditorController.update
    (HelpTopicEditor.java:539)
    at oracle.ide.controller.IdeAction.updateAction(IdeAction.java:593)
    at oracle.ide.controller.IdeAction.updateAction(IdeAction.java:582)
    at oracle.ide.view.View.updateAction(View.java:341)
    at oracle.ide.view.View.updateToolbarActions(View.java:337)
    at oracle.ide.IdeMainWindow$UpdateVisibleActions.fireUpdate(IdeMainWindo
    w.java:673)
    at oracle.ide.IdeMainWindow$UpdateVisibleActions.actionPerformed(IdeMain
    Window.java:652)
    at javax.swing.Timer.fireActionPerformed(Timer.java:271)
    at javax.swing.Timer$DoPostEvent.run(Timer.java:201)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    reloadBuffers(): 47 nodes checked in 0.467968604 second(s)
    fireIdeActivated(): oracle.ide.IdeMainWindow$NodeReloader 471ms
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x61d32910, pid=2480, tid=1724
    # Java VM: Java HotSpot(TM) Client VM (1.5.0_05-b05 mixed mode)
    # Problematic frame:
    # C [OraClient10.Dll+0x112910]
    # An error report file with more information is saved as hs_err_pid2480.log
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    #

    Thanks for the response.
    I tried updating to 1.5.0_10 but still get similar results although slightly less verbose output:
    C:\>"C:\Program Files\sqldeveloper\sqldeveloper\bin\sqldeveloper.exe"
    WARNING: Unknown directive: SetSkipJ2SDKCheck
    Using oracle.home=C:\Program Files\sqldeveloper
    Using ide.user.dir=null
    Addin: Translator PlSql is trying to register a input type (.plsql) which confli
    cts with translator PlSql who already using this input type
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x61d32910, pid=2192, tid=3924
    # Java VM: Java HotSpot(TM) Client VM (1.5.0_10-b03 mixed mode)
    # Problematic frame:
    # C [OraClient10.Dll+0x112910]
    # An error report file with more information is saved as hs_err_pid2192.log
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    C:\>
    Message was edited by:
    Alastair Green
    I found another post by jayantp from 8-dec-2006 where he suggested copying some files from the oracle client jdbc\lib directory to the sqldeveloper\jdbc\lib directory:
    ojdbc14.jar and
    ojdbs14dms.jar
    This works for me but I don't know what the side effects might be. Any thoughts?
    Message was edited by:
    Alastair Green
    Should have said, my client version is 10.2.0.1.0

  • SQLPATH environment variable not read by Sql Developer

    Does anyone know why Sql Developer doesn't seem to read the SQLPATH environment variable? I've googled this situation quite a bit with no luck. Am frankly very confused...How can Sql Developer not have the ability to read from the SQLPATH environment variable?
    Considering all the scripts out there that have been written for Sql*Plus, with the assumption that the SQLPATH variable has been set to allow for multiple directories?
    I feel like I'm just missing something in Tools->Preferences in Sql Developer. I just can't see what it is. As a side note, my overall intention is to enable my team members to run the db build scripts from Sql Developer, rather than Sql*Plus...
    Thanks in advance.

    Hi 917092 ,
    Gary Graham wrote:
    Hi,
    The closest equivalent is Tools|Preferences|Database|Worksheet|Select default path to look for scripts, but supports only a single directory.
    This parameter takes multiple directories. For example in Windows the separation character is ";" . The chooser only allows one directory to be chosen at a time - but multiple paths can be typed in.
    SQLPATH reads the environmental variable (it may not read the windows registry setting).
    set SQLPATH=C:\Documents and Settings\THE_USER\first;C:\Documents and Settings\THE_USER\second
    @first
    (reads first.sql from C:\Documents and Settings\THE_USER\first)
    @second
    (reads second.sql from C:\Documents and Settings\THE_USER\second)
    Is that sufficient?
    If there is a bug to be logged please provide more details:
    Including:
    -OS
    -SQLPATH (environmental variable or set via preferences)
    -worksheet command
    -.sql file / reproducible test case
    -output
    -expected output
    Turloch
    SQLDeveloper Team

  • How to display utf8 characters in sql developer

    Is there a setting I need to change in sql developer in order to display utf8 characters?
    I am seeing weird characters when displaying chinise/arabic characters in sql developer. I can display the same data just fine in Putty ( I changed the following setting in putty before I was able to display utf8 characters ok: Windows->Translation and selected UTF8) .
    Thanks,
    SK

    *1. OS version and oracle version*
    Windows XP Professional/Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    *2. NLS settings for the database*
    AL32UTF8
    *3. Output from sqlplus showing the UTF8 characters*
    \什么是统码
    ANSI
    \什么是统码
    يونی‌کُد چيست؟.utf8
    *4. Same output from SQLDeveloper*
    \什么是统码     ANSI
    \什么是统码     ÙŠÙˆÙ†ÛŒâ€ŒÚ©ÙØ¯ چيست؟.utf8
    Thanks,
    Salem

Maybe you are looking for

  • Not able to validate the xml document against DTD using SAX

    Hi , i am not able to validate xml document against its DTD using SAX parser even after setting setValidating = true. even if the file is not correct according to DTD , it is not throwing any exception. what could be the reason.? please help.. kranth

  • Regsitering log4j appender to a logger in a class in a web app

    During weblogic 9.2 server startup I would like to register a Handler with any number of log4j Loggers in all deployed web apps. I was thinking I could somehow get a reference to the applications classloader, and see if it has log4j, then register wi

  • UDF's in Crystal

    Hi, I am a complete novice when it comes to crystal but am trying to tweak our purchase order layout so that it might bring a manufacturers part number that is located in a UDF bu cant find the UDF field reference in the field explorer, in fact it do

  • Cube - Cube (Pull Based on Request ID)?

    Hi All, I am loading from DSO to Cube (3 times a day). From monday to saturday, the above flow will run and on Sunday I need to do self load (Cube to cube). For self load, I need to consider only the last 3 request from my cube. We dont have any date

  • Digital Booklets from iTunes

    Digital Booklets from iTunes:  When I when I download a music album with a digital booklet from iTunes on to my iPad the music downloads just fine, but the digital booklet does not.  Syncing with computer does not work.  I have tried several options