Joining java array with SQL table in a stored procedure

Hey,
I am calling a pl/sql stored procedure from a java program passing two arrays (employees) and (departments) as parameters to the procedure. Within the procedure I have stored the arrays in a table of records like this:
type t_emp_type is record (employee_id number, department_id number);
type t_emp_tbl_type is table of t_emp_type index by binary_integer;
Where all elements in employees are stored in the employee_id column and departments are stored in the department_id column. So basically I've got a table like:
l_employee_tbl t_emp_tbl_type;
Looped through the arrays and stored the data like:
for i in 1..p_employees.count loop
l_employee_tbl(i).employee_id := p_employees(i);
l_employee_tbl(i).deparment_id := p_departments(i);
end loop;
Now I would like to compare my l_employee_tbl with a SQL table in the database. Basically I would like to join my l_employee_tbl table with a SQL table named departments on department_id, returning all department_id:s that was not found in table departments.
However, it is not possible to select from a user-defined table type. I have also tried to use the table() function and to cast l_employee_tbl, but found out it can't be done with records. And I would really like to use records or some other type where define my PL/SQL data. I know that you should not mix PL/SQL and SQL but in this case I think it is more efficient to try joining these "tables". Does anyone have a solution for this or advice to try something else out? It would be most appreciated.
Edited by: 963281 on 2012-okt-04 14:25
Edited by: 963281 on 2012-okt-05 01:53

963281 wrote:
I am calling a pl/sql stored procedure from a java program passing two arrays (p_employees) and (p_departments) as parameters to the procedure. Within the procedure I have stored the arrays in a table of records like this:
type t_emp_type is record (employee_id number, department_id number);
type t_emp_tbl_type is table of t_emp_type index by binary_integer;Why do you create an associative array?
Now I would like to compare my l_employee_tbl with a SQL table in the database. Basically I would like to join my l_employee_tbl table with a SQL table named departments on department_id, returning all department_id:s that was not found in table departments. Of course, not possible as the SQL engine does not support PL/SQL user defined types. PL/SQL however support user defined SQL types. Which makes SQL defined types a lot more flexible.
However, it is not possible to select from a user-defined table type. I have also tried to use the table() function and to cast l_employee_tbl, but found out it can't be done with records. Never mind SQL and PL/SQL - as a generic programming data structure principle. How do you expect being able to cast an associative array (name-value pairs) to a standard array? The two data structures are very different. So I'm puzzled in how you expect to move a non-scalar name-value pair data structure into a non-scalar value only data structure?
And I would really like to use records or some other type where define my PL/SQL data. Why exactly? If the Java or PL/SQL data structure is populated using SQL data and database data, and wanting to use that data structure in SQL, what is the point? Why pull SQL data into a client data structure at all then - surely it is far more performant and scalable to rather keep that data in the database, and do the joins/selects/filters/etc using SQL?
There is also the issue of scalability of local data structures in PL/SQL. The PL/SQL engine runs inside an Oracle server process, consuming private process memory on the server. The bigger the data structures used in PL/SQL, the more server memory needs to be allocated to that server process. This does not scale. Especially not if 10 or more such server processes are running the same PL/SQL code and each server needs to grab large chunks of server memory.
If the data from Java comes from another source (e.g. keyboard, etc), and you need a means of storing this data server-side for use by PL/SQL and SQL. There are 2 basic choices. PL/SQL arrays for smallish amounts of data - and basing these arrays preferable on SQL data types allowing the array to be used by both SQL and PL/SQL engines. If the amount of data is not smallish, then it should be stored in the SQL engine (database) as that is designed for that exact purpose. And if the data is transient, then a GTT (global temp table) structure can be used (and indexed for optimal access).

Similar Messages

  • Who know how to handle pl/sql table return from stored procedure calling from jsp

    I have some stored procedure which return pl/sql table (index by table), It is look like an array. how jdbc handle this?
    CallableStatement cs = con.prepareCall("EXECUTE bill.getcountry(?,?)");
    cs.setInt(1, cid);
    cs.registerOutParameter(2, java.sql.Types.VARCHAR);// ARRAY?
    ResultSet rs = cs.executeQuery();
    Array array = (Array) rs.getObject (1);
    ResultSet array_rset = array.getResultSet ();

    Not that familiar with the OCI (Oracle Call Interface), but I think this call will be problematic - the OCI deals with SQL data types and not with PL/SQL structures.
    The OCI has since Oracle 8i sported an object call interface (see OCI Runtime Environment for Objects for details).
    This allows you to use the CREATE TYPE command to create advance user data types - and these are supported by the SQL engine, PL/SQL engine and external languages via the OCI.
    So you need to have a look at the Perl-DBI documentation to see how it supports Oracle object types and consider using these. As for internal PL/SQL data structures. These are not supported by the SQL engine and I would expect limited or no support in the OCI for these. Anyway, using SQL data types makes a lot more sense ito flexibility and transparency across languages and environments.

  • How to Join two diff pl/sql table  ???

    i have three queries
    1.One Query returns office and city
    2.Second Query return City - State
    3.Third Query returns State and Sub region
    I use three cursors and i want the output as Office -City -State -Sub region
    city is the joining for 1 and 2
    state is the joining for 2 and 3
    I am thinking of putting into pl/sql table .if it is okay tell me by giving how u will join the two pl/sql tables and if there is any other way kindly let me know .It is urgernt and please give me the code logic so that i can proceed

    First thing why are you using cursors? You can do it
    using SQL.Agreed, it can all be specified in a single SQL statement.
    Secondly I don't think there is some as Pl/Sql TableThere used to be something called a PL/SQL Table, but these have now, thankfully, been renamed to Associative Arrays, because that is what they are, Arrays, not tables. You can't treat Assoc. Arrays as database tables so you can't do Joins in the same way as you would with an SQL statement. To implement a join using arrays would require some (possibly recursive) loops to process each of the arrays to get the required data. This would of course be a lot slower than just using SQL on database tables.
    ;)

  • Issue with Executing OS commands from Stored Procedure

    I am trying to execute the scripts provided at :
    http://github.com/xtender/XT_SHELL
    provided by xtender user.
    As required, I have asked my DBAs to grant privileges by executing the following scripts:
    Begin
      --change to needed permissions and execute
      dbms_java.grant_permission( 'ODS', 'SYS:java.io.FilePermission', '/var/factiva/ODS/bin/CVIM_Rpt_ExportCSVFile’, 'read,write,execute' );
    end;
    /where CVIM_Rpt_ExportCSVFile is my script residing in the Unix server where my Oracle is installed.
    The error I am facing when I try to execute the following command is:
    select * from table(xt_shell.shell_exec('/var/scripts/CVIM_Rpt_ExportCSVFile',100))
    Exception:the Permission (java.io.FilePermission /var/scripts/CVIM_Rpt_ExportCSVFile execute) has not been granted to ODS. The PL/SQL to grant this is dbms_java.grant_permission( 'ODS', 'SYS:java.io.FilePermission', '/var/scripts/CVIM_Rpt_ExportCSVFile', 'execute' )I have asked my DBA to also execute the following scripts: - But I still see the same error as above. I am not able to figure out whats going on. Can anyone pls help me out??
    EXEC Dbms_Java.Grant_Permission('ODS', 'SYS:java.lang.RuntimePermission', 'writeFileDescriptor', '');
    EXEC Dbms_Java.Grant_Permission(ODS', 'SYS:java.lang.RuntimePermission', 'readFileDescriptor', '');
    dbms_java.grant_permission( 'ODS', 'SYS:java.io.FilePermission', '/var/scripts/CVIM_Rpt_ExportCSVFile', 'execute' )

    DUPLICATE
    ===============================================================
    Issue with Executing OS commands from Stored Procedure
    ==============================================================

  • Using C#  instead of pl/sql in a CLR stored procedure,  benefits?

    Hello dear experts,
    I was just playing around with C# and a little stored procedure I deployed to my Oracle 11.
    My questions are:
    Is it possible to call this "CLR c#" stored procedure in a different way than I call a standard pl/sql stored procedure from a C# client, maybe by something like referring to the same c# classname which I chose to wrap the stored procedure/function in?
    Is it possible to eg. return c# classes or c# arrays / own datatypes created within the CLR stored procedure to a C# client?
    Can I build up a c# array within my oracle c# stored procedure and return it to a C# client directly, or do I still have to do all the marshalling based on the standard pre-defined data types (number, varchar2 etc) myself and copy them to c# class members?
    Example: I have c# stored procedure like this:
    namespace oracle
    public class Crosssorter
    public static int GetChute(int parcelNo)
    int nChute=0;
    OracleConnection dbcon = new OracleConnection();
    dbcon.ConnectionString = "context connection=true"; // Wir benutzen die Session des Aufrufers
    dbcon.Open();
    OracleCommand cmd = dbcon.CreateCommand();
    cmd.CommandText = "select ChuteNo ...[blabla] ";
    cmd.Parameters.Add(":1", OracleDbType.Int32, parcelNo, ParameterDirection.Input);
    OracleDataReader reader = cmd.ExecuteReader();
    while (reader.Read())
    nChute = reader.GetInt32(0);
    reader.Close();
    cmd.Dispose();
    return (nChute);
    Can I reuse the class "Crosssorter" within my c# client application in order to access the function 'GetChute' more easily or is this classname only chosen because it has to have a name?
    Can I write an oracle C# stored proc so that a complex c# object is returned?
    So instead of a simple thing like 'public static int GetChute(int parcelNo)' maybe something like
    'public static int GetChute(
    int parcelNo,
    CChuteObject myChute)' <---- !!
    where CChuteObject is a C# class?
    In case all this is not possible, is there a solution to achieve this easily?
    Thank you for reading and thinking.
    Bernd.

    Hi Bernd,
    For best results, you may want to post this over in the [.NET Stored Procedures|http://forums.oracle.com/forums/forum.jspa?forumID=254] forum.
    Greg

  • How can i create a Global Temporary Table inside a Stored Procedure....

    Hi...
    I need to create a Global Temporary Table inside a Stored
    Procedure....
    I have no idea how to do that....
    Please....if u can send me a sample, send to me....
    Thanks a lot

    To create a global temporary table inside a stored procedure,
    the minimal syntax would be:
    CREATE OR REPLACE PROCEDURE procedure_name
    AS
    BEGIN
    EXECUTE IMMEDIATE 'CREATE GLOBAL TEMPORARY TABLE table_name'
    || '(column_name NUMBER)';
    END procedure_name;
    As Todd stated, it would probably be better to create the global
    temporary table outside of the procedure:
    SQL> CREATE GLOBAL TEMPORARY TABLE table_name
    2 (column_name NUMBER);
    Table created.
    You can also specify things like ON COMMIT PRESERVE ROWS or ON
    COMMIT DELETE ROWS.
    It may be that there is something else, like a PL/SQL table of
    records or a cursor, that would suit your needs better. It is
    difficult to guess without knowing what you want to do with it.

  • Execute SQL Task, OLE DB, Stored Procedure, Returns unexpected value upon second run

    when debugging SSIS, the "Execute SQL Task" runs a stored procedure and returns the expected value. When running the package a second time, the task returns an unexpected value. When running in VS2012 SQL editor, everything operates as expected.
    Please help me debug how to get the stored proc to return the same value every time the SSIS Package is run. thanks!
    Here is the sequence of events and what happens....
    Look for a Positor that matches the Application, Host, and User
    No matching PositorId is found, Creates new Positor row, returns that new PositorId
    Use PositorId to upload some data (Every thing works)
    re-run/debug the ssis pacakge
    Look for a Positor that matches the Application, Host, and User 
    <No clue what is happening>
    Returns -1 (SHOULD BE the same PositorId value returned in #2)
    "Execute SQL Task" Setup: No edits to Result Set nor Expressions
    "Execute SQL Task" Setup: GENERAL
    "Execute SQL Task" Setup: PARAMETER MAPPING
    SP called by "Execute SQL Task"
    CREATE PROCEDURE [posit].[Return_PositorId]
    AS
    BEGIN
    DECLARE @PositorId INT = [posit].[Get_PositorId]();
    IF (@PositorId IS NULL)
    BEGIN
    DECLARE @ProcedureDesc NVARCHAR(257) = OBJECT_SCHEMA_NAME(@@PROCID) + N'.' + OBJECT_NAME(@@PROCID);
    DECLARE @PositorNote NVARCHAR(348) = N'Automatically created by: ' + @ProcedureDesc;
    EXECUTE @PositorId = [posit].[Insert_Positor] @PositorNote;
    END;
    RETURN @PositorId;
    END;
    Supporting SQL Objects:
    CREATE FUNCTION [posit].[Get_PositorId]
    RETURNS INT
    AS
    BEGIN
    DECLARE @PositorId INT = NULL;
    SELECT TOP 1
    @PositorId = [p].[PO_PositorId]
    FROM [posit].[PO_Positor] [p]
    WHERE [p].[PO_PositorApp] = APP_NAME()
    AND [p].[PO_PositorHost] = HOST_NAME()
    AND [p].[PO_PositorUID] = SUSER_ID();
    RETURN @PositorId;
    END;
    GO
    CREATE PROCEDURE [posit].[Insert_Positor]
    @PositorNote NVARCHAR(348) = NULL
    AS
    BEGIN
    DECLARE @ProcedureDesc NVARCHAR(257) = OBJECT_SCHEMA_NAME(@@PROCID) + N'.' + OBJECT_NAME(@@PROCID);
    SET @PositorNote = COALESCE(@PositorNote, N'Automatically created by: ' + @ProcedureDesc);
    DECLARE @Id TABLE
    [Id] INT NOT NULL
    INSERT INTO [posit].[PO_Positor]([PO_PositorNote])
    OUTPUT [INSERTED].[PO_PositorId]
    INTO @Id([Id])
    VALUES(@PositorNote);
    RETURN (SELECT TOP 1 [Id] FROM @Id);
    END;
    GO
    CREATE TABLE [posit].[PO_Positor]
    [PO_PositorId] INT NOT NULL IDENTITY(0, 1),
    [PO_PositorApp] NVARCHAR(128) NOT NULL CONSTRAINT [DF__PO_Positor_PO_PositorApp] DEFAULT(APP_NAME()),
    CONSTRAINT [CL__PO_Positor_PO_PositorApp] CHECK([PO_PositorApp] <> ''),
    [PO_PositorName] NVARCHAR(256) NOT NULL CONSTRAINT [DF__PO_Positor_PO_PositorName] DEFAULT(SUSER_SNAME()),
    CONSTRAINT [CL__PO_Positor_PO_PositorName] CHECK([PO_PositorName] <> ''),
    [PO_PositorHost] NVARCHAR(128) NOT NULL CONSTRAINT [DF__PO_Positor_PO_PositorHost] DEFAULT(HOST_NAME()),
    CONSTRAINT [CL__PO_Positor_PO_PositorHost] CHECK([PO_PositorHost] <> ''),
    [PO_PositorSID] VARBINARY(85) NOT NULL CONSTRAINT [DF__PO_Positor_PO_PositorSID] DEFAULT(SUSER_SID()),
    [PO_PositorUID] INT NOT NULL CONSTRAINT [DF__PO_Positor_PO_PositorUID] DEFAULT(SUSER_ID()),
    [PO_PositorNote] VARCHAR(348) NULL CONSTRAINT [CL__PO_Positor_PO_PositorNote] CHECK([PO_PositorNote] <> ''),
    [PO_tsInserted] DATETIMEOFFSET(7) NOT NULL CONSTRAINT [DF__PO_Positor_PO_tsInserted] DEFAULT(SYSDATETIMEOFFSET()),
    [PO_RowGuid] UNIQUEIDENTIFIER NOT NULL CONSTRAINT [DF__PO_Positor_PO_RowGuid] DEFAULT(NEWSEQUENTIALID()) ROWGUIDCOL,
    CONSTRAINT [UX__PO_Positor_PO_RowGuid] UNIQUE NONCLUSTERED([PO_RowGuid]),
    CONSTRAINT [UK__Positor] UNIQUE CLUSTERED ([PO_PositorApp] ASC, [PO_PositorHost] ASC, [PO_PositorUID] ASC),
    CONSTRAINT [PK__Positor] PRIMARY KEY ([PO_PositorId] ASC)
    GO
    ssd

    The error is in item 7: Returns -1 (SHOULD BE the same PositorId value returned in #2); but no error message is returned or thrown from SSIS.
    The error message indicated referential integrity is not upheld when inserting records. This error message occurs AFTER the Execute SQL Task successfully completes; the E.SQL Task returns -1.  The executed SQL code will not allow values less than 0
    ([PO_PositorId] INT NOT NULL IDENTITY(0, 1),)
    [Platts Valid [41]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E2F.
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80040E2F  Description: "The statement has been terminated.".
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80040E2F  Description:
    "The INSERT statement conflicted with the FOREIGN KEY constraint "FK__PricingPlatts_Posit_PositorId". The conflict occurred in database "Pricing", table "posit.PO_Positor", column 'PO_PositorId'.".
    The aforementioned FOREIGN KEY constraint is due to the value being returned by the Execute SQL Task.; therefore, the error lies in the value returned by the Execute SQL Task.

  • Array data sporadically lost when calling stored procedure

    We have weird problem with stored procedures for which I have not been able to find an explanation so far.
    Our app has a bunch of stored procedures which process arrays of integers or strings.
    From time to time (maybe 1 in a 1000) array data gets lost when calling stored procedures. From the logs we know that the data gets sent to the stored procedure, but on the DB side the procedure throws an exception because arrays are empty.
    We are using (modified) OracleConnectionCacheImp (thus PooledConnections, etc.). My latest guess is that maybe somehow ArrayDescriptors on the (pooled)connection used to call the stored procedure are somehow affected when another pooled connection from OracleConnectionCacheImp gets removed by parallel thread. Is that possible? Or are the PooledConnections internally (in pooled connection data source) completely isolated from each other ?

    We have weird problem with stored procedures for which I have not been able to find an explanation so far.
    Our app has a bunch of stored procedures which process arrays of integers or strings.
    From time to time (maybe 1 in a 1000) array data gets lost when calling stored procedures. From the logs we know that the data gets sent to the stored procedure, but on the DB side the procedure throws an exception because arrays are empty.
    We are using (modified) OracleConnectionCacheImp (thus PooledConnections, etc.). My latest guess is that maybe somehow ArrayDescriptors on the (pooled)connection used to call the stored procedure are somehow affected when another pooled connection from OracleConnectionCacheImp gets removed by parallel thread. Is that possible? Or are the PooledConnections internally (in pooled connection data source) completely isolated from each other ?

  • Extraction SQL statement from oracle stored procedure stored in file

    Hi,
    I am newbie to oracle stored procedure. I need to extract the list of sqls present in oracle stored procedure. Besides that I also want to parse these sql statements to get the list of tables and columns used. Is there any tool which can help me in doing thats.
    thanks,
    govind

    why don't check on user_dependencies table instead?
    select referenced_name,referenced_type
    from user_dependencies
    where name='<your stored procedure name in upper case>'
    and referenced_type = 'TABLE'HTH,
    Prazy

  • Returning a table from a stored procedure

    hi, i need to return a table from a stored procedure and show it, and come to this, but a don't know hoy to run it, so i don't know if it is right, can anyone help me?
    uTable out objects_uptime%rowtype
    as
    begin
    select * into uTable from objects_uptime;
    end;

    well, i finally discovered how to do the trick
    this is the code for the function:
    CREATE OR REPLACE FUNCTION FN_GET_RECORDS RETURN UPTIME PIPELINED IS
    CURSOR cUptime is select * from objects_uptime;
    p refcur.refcur_t;
    temp p%ROWTYPE;
    temp2 OUPTIME := OUPTIME(null, null, null, null, null, null, null, null, null);
    BEGIN
    OPEN cUptime;
    LOOP
    FETCH cUptime into temp;
    temp2.OBJ_NAME := temp.OBJ_NAME;
    temp2.IP := temp.IP;
    temp2.STATUS := temp.STATUS;
    temp2.DOE := temp.DOE;
    temp2.ENABLED := temp.ENABLED;
    temp2.COMMENT00000 := temp.COMMENT00000;
    temp2.USERID := temp.USERID;
    temp2.OBJECTID := temp.OBJECTID;
    temp2.MNTID := temp.MNTID;
    pipe row(temp2);
    EXIT WHEN cUptime%NOTFOUND;
    END LOOP;
    RETURN;
    END FN_GET_RECORDS;
    and this for the auxiliar package, object and table:
    CREATE OR REPLACE PACKAGE REFCUR
    as
    TYPE refcur_t IS REF CURSOR RETURN objects_uptime%ROWTYPE;
    end REFCUR;
    CREATE OR REPLACE TYPE OUPTIME AS OBJECT ( "OBJ_NAME"
    VARCHAR2(255), "IP" VARCHAR2(20), "STATUS" VARCHAR2(10),
    "DOE" DATE, "ENABLED" NUMBER(10, 1), "COMMENT00000"
    VARCHAR2(1000), "USERID" VARCHAR2(50), "OBJECTID" NUMBER(10,
    1), "MNTID" NUMBER(10, 1) )
    CREATE TYPE TUPTIME AS
    TABLE OF OUPTIME
    i call it this way:
    select * from table(FN_GET_RECORDS ())
    if anyone knows how to do the same in a shorter manner, tell me please.
    thanks to everybody for the help.

  • How can L identify what are the not null fields of a table in a stored procedure ?

    How can L identify what are the not null fields of a table in a stored procedure ?

    You could query the data dictionary:
    SELECT column_name
    FROM all_tab_columns
    WHERE owner = '...'
    AND table_name = '...'
    AND nullable = 'N'

  • Writing mulitple sql statements in 1 stored procedure

    Hi all, can i know how to create mulitple sql statements in 1 stored procedure??
    Eg the first sql statement will generate few results and my second sql statement will based on the first statement result to execute its second results and my third sql statements will on the second results to generate the final results which will be passed back to jsp pages as a resultset??
    For the time being, i only know how to create a single sql statement in one stored procedure..i had surf through the oracle website but cant find any solution. Can anyone help me?? Samples or links to any website will do.. Thanks alot...

    Hi Irene,
    If I understand your question correctly, then I have already written
    a similar (PL/SQL) stored procedure without any problems.
    However, I do think your question is more suited to the following
    forum:
    http://forums.oracle.com/forums/forum.jsp?id=478021
    I also think it will help others to answer your question if you
    include the following information:
    1. Version of Oracle you are using.
    2. The error message you are getting.
    3. The part of your code that is causing the problem.
    Also, have you looked at the following web sites?
    http://asktom.oracle.com
    http://metalink.oracle.com
    Good Luck,
    Avi.

  • How Create a Global Temporary Table inside a Stored Procedure?

    Hi...
    I need to create a Global Temporary Table inside a Stored
    Procedure....
    I have no idea how to do that....
    Please....if u can send me a sample, send to me....
    Thanks a lot

    there are many ways to do this..
    one u can use dbms_utility package to run ddl statements like
    for ex:
    declare
    t varchar2(200):='order_no';
    v number;
    begin
    --dbms_utility.exec_ddl_statement('select '||t||' into '||v||'
    from
    --ordermaster where rownum=1');
    dbms_utility.exec_ddl_statement('create table cvt(t number)');
    dbms_output.put_line(v);
    end;
    but the actual method(recommended) involves a bit coding using
    dbms_sql package you will find examples on technet or metalink
    to use this package..
    I hope this helps
    Narendra

  • Q: 2-dim java Array to SQL rowtype?

    I wrote a piece of software that enables access from SQL to OpenCyc (the worlds largest common sense knowledge base). (see http://www.opencyc.org/ and http://217.117.225.187/~yeb/ooi.pdf and for the code http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/opencyc/oracle/ )
    It allows for queries like
    SELECT * FROM TABLE(
    SELECT cyc.askWithVariable( '(#$isa ?X #$Person)', '?X' ) FROM DUAL)
    It uses java to connect to opencyc. In the example above, askWithVariable returns an oracle.sql.ARRAY, that is constructed like this:
    ArrayDescriptor desc = ArrayDescriptor.createDescriptor("CYCLIST_TYPE", conn);
    oracle.sql.ARRAY arrayanswer = new oracle.sql.ARRAY(desc, conn, cyclist.toArray());
    The CYCLIST_TYPE is a TABLE OF VARCHAR(4000).
    The call specification maps this cyclist_type to oracle.sql.ARRAY, so it can be used in queries like the example above.
    Yesterday I've been trying (but not succeeding) to make a variant that returns a list of more than one variable; two dimensional array.
    Q1: Nowhere I've seen a multi column example of the select * from table( a collection ) construct. Is this possible at all?
    Q2: Is there a java example of a 2 dimensional array that gets converted to a PL/SQL or SQL type?
    Thanks!
    Yeb Havinga

    But when I was created stored procedure, array and customised data type with in package, java throws an exception like an invalid pattern You will have to create array type outside the package to make it work.
    Retruning array from plsql to java
    http://otn.oracle.com/sample_code/tech/java/codesnippet/jdbc/varray/index.html
    Writing array from java to plsql
    http://asktom.oracle.com/pls/ask/f?p=4950:8:385799930469889632::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:712625135727,
    Chandar

  • Problem with SQL table

    Hello,
    My house mates and me are database development students, we started studying Oracle Database Express Edition. We both used same pen drive to install oracle and to transfer the tutorial sql table to C:\oraclexe\app\oracle\product\11.2.0\server\bin . When I use the command "select * from table;" im getting "no rows selected" .
    With the same file and same command, the table is displayed on my housemate`s computer. Why it doesnt work on me ? The only difference is that im on XP, he is on win7.

    SQL> select * from cat;
    Hit <RETURN> to continue ...
    TABLE_NAME TABLE_TYPE
    APEX$_ACL TABLE
    APEX$_WS_FILES TABLE
    APEX$_WS_HISTORY TABLE
    APEX$_WS_LINKS TABLE
    APEX$_WS_NOTES TABLE
    APEX$_WS_ROWS TABLE
    APEX$_WS_TAGS TABLE
    APEX$_WS_WEBPG_SECTIONS TABLE
    APEX$_WS_WEBPG_SECTION_HISTORY TABLE
    BIN$+14+HMhfQhmc/wBwDDgDMg==$0 TABLE
    BIN$+dLRoxSfRsS79lxdAW3H1g==$0 TABLE
    BIN$+uVuekYHTye3LWDqeeRmcw==$0 TABLE
    BIN$/4anwnG1RSCVM9ugl4ytOg==$0 TABLE
    BIN$0QrShGnYQ3+DRYEnnJFwwg==$0 TABLE
    BIN$0Z2X1K0XSxi97HriFGSd0Q==$0 TABLE
    BIN$0k4r8phUQ7Cc+M65swlLig==$0 TABLE
    Hit <RETURN> to continue ...
    TABLE_NAME TABLE_TYPE
    BIN$1UqGPQ3eRYuNkb3/XacgNQ==$0 TABLE
    BIN$1cwHQMkdSLG5cJ19OZy+ow==$0 TABLE
    BIN$243UziA/T5iejwir7s82xQ==$0 TABLE
    BIN$2I+OmIlfT6OW/3V1kj5LDQ==$0 TABLE
    BIN$2reTHL6MSS6UtzuNe5p0XQ==$0 TABLE
    BIN$3RYELYE0SRmJSbb22V+09Q==$0 TABLE
    BIN$40KATBFYR2KGOSX+NW3mzA==$0 TABLE
    BIN$4CvKoaIcRVOH3CjPI7x+2w==$0 TABLE
    BIN$4tB3PqH3QhuAzwX6JTQmfQ==$0 TABLE
    BIN$54XttiE/TLejC9R6zSvOhQ==$0 TABLE
    BIN$5bwIu8QJRk6RiqplhYOipg==$0 TABLE
    BIN$6QbqIX71Tqy2aU9lNfweJg==$0 TABLE
    BIN$6jUe6GNsT7Cfy606JJUOpg==$0 TABLE
    BIN$73QnPKxlQOSv5M5hewjUGg==$0 TABLE
    BIN$7Sxf2g9XRoOoOrN5xnl7Rw==$0 TABLE
    BIN$7ybCkN+mTPqEmkfeXvx9WQ==$0 TABLE
    Hit <RETURN> to continue ...
    TABLE_NAME TABLE_TYPE
    BIN$8Yes6m0ZT7arykKeIX5ylg==$0 TABLE
    BIN$8ktaa2UvRO6pJuvF5o5c3Q==$0 TABLE
    BIN$9IrxwjOAS4OqSH/+bvKpmg==$0 TABLE
    BIN$9KhJzVDAS4CBJt7JWogfmA==$0 TABLE
    BIN$9eaxchybT5aAtw3dSTHskA==$0 TABLE
    BIN$9fEMvhpLSdaw0eQBetffaw==$0 TABLE
    BIN$9jJYCasWSfmZ/I/Ou59zYA==$0 TABLE
    BIN$9rpQRYN+Tzi4MhnA/+9DVw==$0 TABLE
    BIN$AjXsa+bDR5uWpo1u2iPPCw==$0 TABLE
    BIN$AmZt7sqgSFKVlGZ1tobIkA==$0 TABLE
    BIN$B1Oafcq8SzameUXhNOoZFA==$0 TABLE
    BIN$B1PCjRt4SVuhjwg/FaCvNQ==$0 TABLE
    BIN$Bs1hr9f3S3ud0MhZO7JVCA==$0 TABLE
    BIN$CA7ACjcQQoesNqWg0k94rg==$0 TABLE
    BIN$CF2TpIgXT76mwpeYEORO3Q==$0 TABLE
    BIN$COnpWebyQyKOvQvt7OclJw==$0 TABLE
    Hit <RETURN> to continue ...
    TABLE_NAME TABLE_TYPE
    BIN$CVjTUKi7SMSua/LGz9fpzA==$0 TABLE
    BIN$CupfqQo7RTqqqF+xYcmUvA==$0 TABLE
    BIN$CxMLMmA4T0aIbqSKdxsZ0A==$0 TABLE
    BIN$E+TR+RejSY+t9O0NKqnEgA==$0 TABLE
    BIN$EbzQcDihSt2Cv2yGVYH76A==$0 TABLE
    BIN$F4mQgC3OQzyTHOfxe3EbMA==$0 TABLE
    BIN$FQxQIZ2nRDKWv5lhi2MgVQ==$0 TABLE
    BIN$GW80+MfyTjS2C7H/YnHKjA==$0 TABLE
    BIN$GuA4XOy+TjCgL8MwfaJ0Ag==$0 TABLE
    BIN$HPt4d6RlQHGODTK+3i9Ymg==$0 TABLE
    BIN$HtXPeXEqRxCcY1aUiSo+dQ==$0 TABLE
    BIN$Hx20oVXCReCZHWN+7aH0uw==$0 TABLE
    BIN$J9/wbv9bSbyU/2HrOBidIA==$0 TABLE
    BIN$JEsopaTPSQ2hdbLaw9KiYQ==$0 TABLE
    BIN$JGnvCmGIQ+e2Qki5AFaYDQ==$0 TABLE
    BIN$JcwyBadcTiS9pmpMi2GKwg==$0 TABLE
    Hit <RETURN> to continue ...
    TABLE_NAME TABLE_TYPE
    BIN$Jkf7/MHYT1qDeanLo/Sw2Q==$0 TABLE
    BIN$KAGywEHPRuepwC/S0Gv1jg==$0 TABLE
    BIN$LAJRRsjvSSWCuOxz/5NWbg==$0 TABLE
    BIN$M4/PznY8RW6/iAWbzrOYpQ==$0 TABLE
    BIN$MNavZEECR6GI7Alpo6GwxA==$0 TABLE
    BIN$MNs10fZTTii1JSzhHDL3rg==$0 TABLE
    BIN$MRQvyzXSRXK+cf0Chiv9+w==$0 TABLE
    BIN$Muw/JhnURvi8ZiS6RSpP4A==$0 TABLE
    BIN$NkeH50+nRAuypA2oBentLw==$0 TABLE
    BIN$OHpuIfw6TkKi5tEKmSbg5Q==$0 TABLE
    BIN$P1HlgkdlTJeysz9RxnEKdg==$0 TABLE
    BIN$PNgoaQR3Sq+4GhviMe7XKA==$0 TABLE
    BIN$PXM7RjH1TA+aKmNIZi6mzw==$0 TABLE
    BIN$PdfPSnT0SKOgVY5Hbzx4Jw==$0 TABLE
    BIN$QFwqh7JuTkq2beCXCYoRLw==$0 TABLE
    BIN$QVTPpzylREyM3PpRCT0UDQ==$0 TABLE
    Hit <RETURN> to continue ...
    TABLE_NAME TABLE_TYPE
    BIN$R4Bv3C5zRhWTMh/XAx/2KA==$0 TABLE
    BIN$R9cZvlVtS7KzPphwGIt5Gw==$0 TABLE
    BIN$RIxAOkFPQE6u7EqgPwJnWg==$0 TABLE
    BIN$RXK2T9M3SDK1cij82SYZlQ==$0 TABLE
    BIN$RkXaj9jBS02AJQR5uw4f6Q==$0 TABLE
    BIN$S0DV4Q5fROmt7zjTLIleqw==$0 TABLE
    BIN$SFdD1HNmSBmVW/9DxQofdw==$0 TABLE
    BIN$ST8Gk12YQkaq7jHAqrUPqg==$0 TABLE
    BIN$T01LdE/ZRRubJ7oSg5bgEg==$0 TABLE
    BIN$T2+bN3rETXy720BfLhMVeg==$0 TABLE
    BIN$T43E2dSZQLqX2boS5PK63A==$0 TABLE
    BIN$TMU/SouMQUycLIi5reN8ZQ==$0 TABLE
    BIN$Ti22a824SJqmEHXKJj6w0Q==$0 TABLE
    BIN$U7J7paMrR1uJIhDfWego1A==$0 TABLE
    BIN$UE/iro5GRz+mXr7kRnWUsg==$0 TABLE
    BIN$Ubgtu31tRniD+IDtfT00jA==$0 TABLE
    Hit <RETURN> to continue ...
    TABLE_NAME TABLE_TYPE
    BIN$UtkZpYeWTrW6Sf3xAlne6g==$0 TABLE
    BIN$V2qJgTnTQIyvUMPr7h5RRw==$0 TABLE
    BIN$ViJ7Kik0TLGqAeIeJ6i1uQ==$0 TABLE
    BIN$Vpx4c6lZTay4jNZApIwpPg==$0 TABLE
    BIN$W8qbHkYSQsW6USn4GLpVMA==$0 TABLE
    BIN$XClNraUxT+OWtUmxXrmtUw==$0 TABLE
    BIN$XfAw1Dl4S22ALnZOEKO6tA==$0 TABLE
    BIN$YCNF/5tASjW76KWJTJxQCw==$0 TABLE
    BIN$YTmiD0HjR6uevG2yQfNeYg==$0 TABLE
    BIN$YvZ85To1Rwqe0cZfYZd1bg==$0 TABLE
    BIN$Z2nomMoHSLObzFe84bpoKw==$0 TABLE
    BIN$a05wHoD7TH+b0OZIwLdkFA==$0 TABLE
    BIN$ajL4kZDNQ5CH+sVmr2T3uA==$0 TABLE
    BIN$atcjr20dQ/6nb8nJqi1Hhg==$0 TABLE
    BIN$b5cHFRdDQXeFg64XlP9Xew==$0 TABLE
    BIN$d15FUyO2TKCriycrXZGTmA==$0 TABLE
    Hit <RETURN> to continue ...
    TABLE_NAME TABLE_TYPE
    BIN$ezJVvthuSTKv/5tt9grKEQ==$0 TABLE
    BIN$fOH4cEYiQGaXsIy15nVBGw==$0 TABLE
    BIN$g4NzBIhFQaOFtrMg6BDXVQ==$0 TABLE
    BIN$gXS+NIYBQXyphJBPTbAfSA==$0 TABLE
    BIN$gjHOrcQ+RbOd54VUs0PqGg==$0 TABLE
    BIN$glmeEmJMTWuC375rGhPK1A==$0 TABLE
    BIN$hYCNT27iQASpxFk3QQO/WA==$0 TABLE
    BIN$i1OXZRCTSlykIzrl5cUGqg==$0 TABLE
    BIN$ilvBQOWrSOSQT01J+5MXPw==$0 TABLE
    BIN$k9oizkOsQauMFQQqYuRTaA==$0 TABLE
    BIN$kI1JVjkGQ2GPm/XiGPZjZg==$0 TABLE
    BIN$l1aRH4jvRTy0/f2o0e0IqQ==$0 TABLE
    BIN$mLVINEGoSoGBum7bIktbnQ==$0 TABLE
    BIN$mev7cot5S+iyE1NAXO2+1A==$0 TABLE
    BIN$mvIUnpItSh2+a8QbDajP8g==$0 TABLE
    BIN$mzDGCMEkR7i8LzX6cyZb+w==$0 TABLE
    Hit <RETURN> to continue ...
    TABLE_NAME TABLE_TYPE
    BIN$n2RcVd3wRZC/MEZbb5kQIA==$0 TABLE
    BIN$nvkvgxFQQSqpwivA9QJb/g==$0 TABLE
    BIN$olOmi9DyTOSAUMgBhWTzuQ==$0 TABLE
    BIN$om8c9R5BRRCqMIw4b3HZ9g==$0 TABLE
    BIN$p+tEJvchSKu7JzCJCl9euA==$0 TABLE
    BIN$pXjKxK23TbSuBph8rq3KRA==$0 TABLE
    BIN$q94rmRwfRgWyJ+zEOM/ZDg==$0 TABLE
    BIN$qFJb6gFNQY+mz4BPGlynSw==$0 TABLE
    BIN$qTc68mzdSN+BIZx2WvtsRA==$0 TABLE
    BIN$qbVj2OhwQNGcMfUOmv+UYQ==$0 TABLE
    BIN$qcrcUgfySaGTMLi/Ep3e/g==$0 TABLE
    BIN$st0EpAavTA+e9rrnEUI2cw==$0 TABLE
    BIN$tO53xOkNT1eDSbkY8Gft5A==$0 TABLE
    BIN$tvOzHRf2QRat10N5tO460g==$0 TABLE
    BIN$ubyEf/qiQ+qZbQXY31UprQ==$0 TABLE
    BIN$v3Pn2G1SRbSb8mVo7ks+pQ==$0 TABLE
    Hit <RETURN> to continue ...
    TABLE_NAME TABLE_TYPE
    BIN$vHz3VmLhTA6iSnyF2nXx3g==$0 TABLE
    BIN$wELTa61TQMCn0/8pSu2XHg==$0 TABLE
    BIN$whMlaC4+StmeUeoz4OfSrQ==$0 TABLE
    BIN$xGIBh0mVSeaEoufrjVZf1Q==$0 TABLE
    BIN$xL1AsuodQMq/lbz81N6bng==$0 TABLE
    BIN$xeyqm9LcRLWp3A0Ql4icvg==$0 TABLE
    BIN$yuOzs3yORmmNmcV93KC/Vg==$0 TABLE
    BONUS TABLE
    CUSTID SEQUENCE
    CUSTOMER TABLE
    DEMO_CUSTOMERS TABLE
    DEMO_CUST_SEQ SEQUENCE
    DEMO_ORDERS TABLE
    DEMO_ORDER_ITEMS TABLE
    DEMO_ORDER_ITEMS_SEQ SEQUENCE
    DEMO_ORD_SEQ SEQUENCE
    Hit <RETURN> to continue ...
    TABLE_NAME TABLE_TYPE
    DEMO_PRODUCT_INFO TABLE
    DEMO_PROD_SEQ SEQUENCE
    DEMO_STATES TABLE
    DEMO_USERS TABLE
    DEMO_USERS_SEQ SEQUENCE
    DEPT TABLE
    DUMMY TABLE
    EMP TABLE
    ITEM TABLE
    ORD TABLE
    ORDID SEQUENCE
    PRICE TABLE
    PRODID SEQUENCE
    PRODUCT TABLE
    SALES VIEW
    SALGRADE TABLE
    176 rows selected.
    SQL> select * from dept;
    Hit <RETURN> to continue ...
    DEPTNO DNAME LOC
    10 ACCOUNTING NEW YORK
    20 RESEARCH DALLAS
    30 SALES CHICAGO
    40 OPERATIONS BOSTON
    4 rows selected.

Maybe you are looking for

  • My mac keeps freezing when turned on from Sleep

    Hello, I bought in iMac last Summer. About a couple weeks in, I started having issues with my iMac freezing when I would turn it on from Sleep mode. This would not happen every time but instead, intermittently. It also will manifest itself in differe

  • Why does the /s not work for me in the commandline?

    We have a HD webcam pointed at a pooltable in our local poolbar. We use FMLE to stream to Dacast. To finish the project we want to automate the process: only stream between 17.00 and 01.00 hours every day. It looks like FMLEcmd + batch/cmd files + sc

  • IPA fonts on my MAC don't work! Urgent help please!!!

    I have installed IPA fonts on my MAC with OSX mountain lion. Unfortunately if i open the .ppt file where the professor has written the symbols i see just a "private use f8ff" and if i try to change the font nothing happens. Could you help me? Here yo

  • IMovie and iTunes

    I have a problem with iMovie. When I click the note logo in the middle bar iTunes won't show up in the menu and I can't choose it and add music in my videos. How can I get iTunes to show up in the music and sound effects menu?

  • Linux RedHat8 and Swing

    Hi All I'm new to Java and have a problem. My program calls javax.swing which is fine in windows but cant find it in Linux and neither can I. Javax directory exists with a couple of modules but no swing. I am using 1.4.1 02 sdk linux rpm package. Whe