How to declare procedure without using IN OUT parameter?

Hi:
I want to declare procedure without using IN OUT parameter.
My Script is:
DECLARE
procedure pro_bank_master() As
Declare
kr_bankid integer;
last_bank_id number(10,0);
CURSOR comp_cur IS select bank_id,date_created,created_by,modified_by,name_en from COM_BANK_MASTER ;
comp_rec comp_cur%ROWTYPE;
BEGIN
OPEN comp_cur;
FETCH comp_cur INTO comp_rec;
WHILE comp_cur%FOUND
LOOP
kr_bankid:= comp_rec.bank_id;
insert into crayom_db.C_Bank(ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, name, routingno, c_location_id, swiftcode, isownbank, description) values(11,11,'Y',sysdate,100,sysdate,11,comp_rec.name_en,'A',1000009,'A','Y','A');
select crayom_db.C_Bank.c_bank_id into last_bank_id from crayom_db.C_Bank where rownum=1 ORDER BY crayom_db.c_bank.c_bank_id DESC;
insert into crayom_db.CR_IdBackup values(kr_bankid, last_bank_id);
FETCH comp_cur INTO comp_rec;
End LOOP;
close comp_cur;
END;
BEGIN
pro_bank_master();
END;
The Error i am receiving is:
Error starting at line 1 in command:
DECLARE
procedure pro_bank_master() As
Declare
kr_bankid integer;
last_bank_id number(10,0);
CURSOR comp_cur IS select bank_id,date_created,created_by,modified_by,name_en from COM_BANK_MASTER ;
comp_rec comp_cur%ROWTYPE;
BEGIN
OPEN comp_cur;
FETCH comp_cur INTO comp_rec;
WHILE comp_cur%FOUND
LOOP
kr_bankid:= comp_rec.bank_id;
insert into crayom_db.C_Bank(ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, name, routingno, c_location_id, swiftcode, isownbank, description) values(11,11,'Y',sysdate,100,sysdate,11,comp_rec.name_en,'A',1000009,'A','Y','A');
select crayom_db.C_Bank.c_bank_id into last_bank_id from crayom_db.C_Bank where rownum=1 ORDER BY crayom_db.c_bank.c_bank_id DESC;
insert into crayom_db.CR_IdBackup values(kr_bankid, last_bank_id);
FETCH comp_cur INTO comp_rec;
End LOOP;
close comp_cur;
END;
BEGIN
pro_bank_master();
END;
Error report:
ORA-06550: line 8, column 27:
PLS-00103: Encountered the symbol ")" when expecting one of the following:
<an identifier> <a double-quoted delimited-identifier>
current
06550. 00000 - "line %s, column %s:\n%s"
*Cause:    Usually a PL/SQL compilation error.
*Action:
Can any Body Help Me?
Thank You

DECLARE
procedure pro_bank_master As --also you should remove brackets when you are not using any parameters
----Declare-- *( declare should not be present in procedure declaration )*
kr_bankid integer;
last_bank_id number(10,0);
CURSOR comp_cur IS select bank_id,date_created,created_by,modified_by,name_en from COM_BANK_MASTER ;
comp_rec comp_cur%ROWTYPE;
BEGIN
OPEN comp_cur;
FETCH comp_cur INTO comp_rec;
WHILE comp_cur%FOUND
LOOP
kr_bankid:= comp_rec.bank_id;
insert into crayom_db.C_Bank(ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, name, routingno, c_location_id, swiftcode, isownbank, description) values(11,11,'Y',sysdate,100,sysdate,11,comp_rec.name_en,'A',1000009,'A','Y','A');
select crayom_db.C_Bank.c_bank_id into last_bank_id from crayom_db.C_Bank where rownum=1 ORDER BY crayom_db.c_bank.c_bank_id DESC;
insert into crayom_db.CR_IdBackup values(kr_bankid, last_bank_id);
FETCH comp_cur INTO comp_rec;
End LOOP;
close comp_cur;
END;
BEGIN
pro_bank_master();
END;
Edited by: user11183973 on Sep 22, 2009 5:49 PM

Similar Messages

  • Using IN OUT parameter in procedures

    Hello Experts ;
    Good morning all;
    i am trying to  execute a program using procedure ( IN and IN OUT ) parameter.
    i have a emp table i want to update perk  column details.
    >> Here is coding >>
    1  create or replace procedure emp_salary
      2  (id IN emp.eid%type , salary IN OUT emp.esalary%type) IS
      3  tmp_sal number;
      4  BEGIN
      5  select esalary into tmp_sal from emp  where eid=id;
      6  if tmp_sal between 10000 and 20000 THEN
      7  salary_inout := tmp_sal*1.2;
      8  else if tmp_sal between 20001 and 29999 THEN
      9  salary_inout := tmp_sal*1.8;
    10  ELS IF tmp_sal > 30000 then
    11  salary_inout := tmp_sal*2.0;
    12* END;
    SQL> /
    Warning: Procedure created with compilation errors.
    SQL> show errors;
    Errors for PROCEDURE EMP_SALARY:
    LINE/COL ERROR
    10/5     PLS-00103: Encountered the symbol "IF" when expecting one of the
               following:      := . ( @ % ;   The symbol ";" was substituted for "IF" to continue.
    12/4     PLS-00103: Encountered the symbol ";" when expecting one of the
             following: if
    MY DB version is : 10.2.0.1
    emp details :
    SQL> select * from emp;
    |EID | ENAME  |  EQUAL |  ESALARY | ECITY     |  EPERK   |    
    1    sona    |   mba  |  10000   | ********    |            |
    2    maya   |   mca  |  15000   |  **********|            |
    3    sony    |   msc   |  20000   |  ****         |            |
    4    King    |   m.s   |  22000   |  **********|             |
    5    ford     |   m.s   |  40000   | **********|              |
    Thanks in advance ;

    Hello all ;
    Thanks for all replies.  I slightly modified  my code because to understand without  any doubt.
    nothing , just removed  salary_inout.
    >> My table  details >>
    SQL> desc emp;
    Name                                      Null?    Type
    EID                                                      NUMBER
    ENAME                                               VARCHAR2(15)
    EQUAL                                               VARCHAR2(10)
    ESALARY                                           VARCHAR2(15)
    ECITY                                                 VARCHAR2(15)
    EPERK                                                NUMBER
    ECONTACT_NO                                NUMBER
    >> Dummy Records  >>
    SQL> select * From emp;
        EID   ENAME       EQUAL      ESALARY     ECITY         EPERK 
         1       sona              mba         10000             XXXXXX  
         2       maya             mca         15000             XXXXXX
    so ,  i want  to create procedure to increment salary as per conditions.
    SQL> create  or  replace  procedure   emp_salary
      2  (id  IN  emp.eid%type ,
      3  salary IN OUT emp.esalary%type ) IS
      4  tmp_sal  number;
      5  BEGIN
      6  select esalary into tmp_sal from emp  where eid=id;
      7  if tmp_sal between 10000 and 20000 THEN
      8   salary := tmp_sal*1.2;
      9  else if tmp_sal between 20001 and 29999 THEN
    10   salary := tmp_sal*1.8;
    11  ELSE IF tmp_sal > 30000 then
    12   salary := tmp_sal*2.0;
    13  END IF;
    14  END IF;
    15  END IF;
    16  END;
    17  /
    Procedure created.
    >> Here , i am getting error  >>
    SQL> execute   emp_salary;
    BEGIN emp_salary; END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'EMP_SALARY'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    My DB version is : 10.2.0.1.0  on OEL 4.4  ( Personal  database - for self studies).
    I have some doubts  please , please  .........  clear  my doubt !
    1.  when creating procedure  for  some columns  from  original table ,
      - i always use  following method .
      local_vaibale_name   <table_name>.<org_column_name>%type ; that is ,
        id  emp.eid%type;   - then why i am getting error ?
    Please  find my error and help me to resolve it.
    Thanks.

  • How to use the "out" parameter in idl

    hello.idl:
    module HelloApp
    interface Hello
    string sayHello();
    void getPass(in string name,out string pass);
    HelloServer:
    public class HelloServer
    class HelloServant extends _HelloImplBase
    public void getPass(String name,org.omg.CORBA.StringHolder pass)
    System.out.println("Server pass = " + pass);
    if (name.equals("lxh"))
    pass = new org.omg.CORBA.StringHolder("1234");
    if (name.equals("cbj"))
    pass = new org.omg.CORBA.StringHolder("5678");
    HelloClient:
    public class HelloClient
    public static void main(String args[])
    try{
    org.omg.CORBA.StringHolder Pass = null;
    if (args.length == 1)
    System.out.println("Client pass = " + args[0]);
    helloRef.getPass(args[0],Pass);
    System.out.println(Pass);
    } catch(Exception e) {
    When I run client main method with parameter "lxh",I will get a error says the getPass() parameter which has given is wrong.
    How to use the out parameter in client?

    Does this error only occurs if you pass "lxh" or always?
    Did you try passing a StringHolder Object rather than a NULL Object?
    Perhaps you can post the error message!?

  • How to use the out parameter of a transformation

    Hi All,
    I have a requirement where I need to move all the transformations from process flows to map.SO for each transformation I need to have 1 map which calls this transformation.I have 1 transformation which has both input and output parameter.If I use this transformation in mapping then how to use the out parameter of thsi transformation.This out parameter needs to beused in other mappings.Can soemone please help me.
    Thansk in advance

    Hi,
    I'm not quite sure what you are trying to do.
    What works: Connect the outgroup of a pre- or post-mapping process operator to the mapping output parameter operator..
    What does not work: Connect the outgroup of an operator that can return more than one row (e.g. table operator, filter, joiner ,...) to the mapping output parameter operator. The mapping output parameter just returns "one row", like a pl/sql function call.
    You cannot pass a "data stream" from one mapping to another. Maybe the pluggable mappings is what you are looking for.
    Regards,
    Carsten.

  • How can I print without using Airprint

    How can I print without using Airprint - Can I assign a printer to the Ipod touch

    Go to the App store and purchase an appropriate app.  There are many apps that are for specific printer/printer manufacturers and general ones like Print Central.

  • HT5622 how to purchase apps without using credit cards

    how to purchase apps without using credit cards

    If they are available in your country, you can use Gift Cards. Basically a prepaid card of a specified amount you can redeem to your iTunes account to get the balance for it added to your account.
    Then you can use that balance to buy things in iTunes, iBooks, and App Stores.
    http://support.apple.com/kb/ht1574
    If available in your country, thye can be bought form most convenience and electronic stores.

  • Call from Java Plsql Procedure with VArray as Out Parameter

    Hi,
    I have a Java web application(Tomcat server) that call a plsql procedure with Varray as OUT parameter.
    The Plsql code is perfectly compiled.
    When i run the application, I get the following error msg in my Tomcat window:
    java.sql.SQLException: ORA-06530: Reference to uninitialized composite
    ORA-06512: at "SEMS1.PACK_SEMSADMIN_OFFEREDJOBS", line 102
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:109
    3)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStat
    {color:#0000ff}
    Doubt: Do I need to declare ArrayDescriptors to retrieve the VArray from the Plsql procedure.
    I think the below statement is enough; we need ArrayDescriptors only when we we wish to send a Plsql Object or Varray from Java code to the procedure. Plz correct me if not so.
    dbCallableStatement.execute();
    ARRAY SimpleOUTArray = (ARRAY) ((OracleCallableStatement) dbCallableStatement).
    getObject(Integer.parseInt(arlParameterOutIndex.get(i).toString()));{color}
    I am unable to realize where the mistake is?
    {color:#800000}
    {color}{color:#800000}
    VARRAY AND PROC DETAILS:
    TYPE STRUCT_JOB_DETAILS AS OBJECT
    APPL_NO NUMBER (10),
    S_FNAME VARCHAR2 (32 Byte),
    S_MI VARCHAR2 (32 Byte),
    S_LNAME VARCHAR2 (32 Byte),
    APPL_DATE DATE,
    DESCRIPTION VARCHAR2 (100 Byte),
    S_UCID VARCHAR2 (8 Byte)
    TYPE VARRAY_JOB_DETAILS IS VARRAY(100) OF STRUCT_JOB_DETAILS;{color}
    {color:#800000}PROCEDURE:{color}
    {color:#800000}CREATE OR REPLACE PACKAGE PACK_SEMSADMIN_OFFEREDJOBS
    AS
    TYPE Generic_Cursor_Type IS REF CURSOR;
    --TYPE varray_job_detail is VARRAY(100) OF STRUCT_JOB_DETAILS;
    --va_varray_job_detail varray_job_detail := varray_job_detail();
    va_varray_job_detail VARRAY_JOB_DETAILS := VARRAY_JOB_DETAILS();
    PROCEDURE Admin_Jobs_Offered_Rtr
    ic_status IN VARCHAR2,
    or_offered_jobs OUT Generic_Cursor_Type,
    va_varray_job_detail OUT VARRAY_JOB_DETAILS
    CREATE OR REPLACE PACKAGE BODY PACK_SEMSADMIN_OFFEREDJOBS
    AS
    PROCEDURE Admin_Jobs_Offered_Rtr
    ic_status IN VARCHAR2,
    or_offered_jobs OUT Generic_Cursor_Type,
    va_varray_job_detail OUT VARRAY_JOB_DETAILS
    AS
    vc_query VARCHAR2(15000) := '';
    vc_query_1 VARCHAR2(15000) := '';
    counter NUMBER := 1;
    vc_no NUMBER := 0;
    or_applicants_list Generic_Cursor_Type;
    TYPE type_appln_list IS RECORD
    job_no NUMBER(10),
    job_title VARCHAR2(50 BYTE),
    account_no VARCHAR2(10 BYTE),
    head_fname VARCHAR2(32 BYTE),
    head_minitial VARCHAR2(10 BYTE),
    head_lname VARCHAR2(32 BYTE),
    num NUMBER
    vn_appln_list type_appln_list;
    TYPE type_job_offered IS RECORD
    APPL_NO NUMBER (10),
    S_FNAME VARCHAR2 (32),
    S_MI VARCHAR2 (32),
    S_LNAME VARCHAR2 (32),
    APPL_DATE DATE,
    DESCRIPTION VARCHAR2 (100),
    S_UCID VARCHAR2 (8)
    vn_job_offered type_job_offered;
    BEGIN
    vc_query := vc_query || ' SELECT jobs.job_no,job_title, account_no, head_fname, head_minitial, head_lname, num';
    vc_query := vc_query || ' FROM jobs, ( ' ;
    vc_query := vc_query || ' SELECT jobs.job_no,count(*) as num' ;
    vc_query := vc_query || ' FROM student_apps ,jobs ' ;
    vc_query := vc_query || ' WHERE jobs.job_no = student_apps.job_no' ;
    vc_query := vc_query || ' AND (student_apps.status in (''o'',''t'')) '; --|| ic_status || ')' ;
    vc_query := vc_query || ' AND jobs.status not in (''z'', ''Z'')' ;
    vc_query := vc_query || ' GROUP BY jobs.job_no' ;
    vc_query := vc_query || ' ) no_apps_off' ;
    vc_query := vc_query || ' WHERE jobs.job_no = no_apps_off.job_no' ;
    dbms_output.put_line('Executed Query_1');
    va_varray_job_detail := VARRAY_JOB_DETAILS();
    va_varray_job_detail.extend(100);
    OPEN or_offered_jobs FOR vc_query;
    LOOP
    FETCH or_offered_jobs INTO vn_appln_list;
    EXIT WHEN or_offered_jobs%NOTFOUND;
    vc_query_1 := '';
    vc_query_1 := vc_query_1 || ' SELECT stud_apps.appl_no APPL_NO, stud_apps.s_fname S_FNAME, ';
    vc_query_1 := vc_query_1 || ' stud_apps.s_mi S_MI, stud_apps.s_lname S_LNAME, ';
    vc_query_1 := vc_query_1 || ' stud_apps.appl_date APPL_DATE, look_up.description DESCRIPTION, ' ;
    vc_query_1 := vc_query_1 || ' stud_apps.s_ucid S_UCID ' ;
    vc_query_1 := vc_query_1 || ' FROM student_apps stud_apps,jobs jbs,lookup look_up' ;
    vc_query_1 := vc_query_1 || ' WHERE stud_apps.status in (''o'',''t'') '; --(' || ic_status || ') ' ;
    vc_query_1 := vc_query_1 || ' AND jbs.job_no = stud_apps.job_no' ;
    vc_query_1 := vc_query_1 || ' AND jbs.status not in (''z '', ''Z'')' ;
    vc_query_1 := vc_query_1 || ' AND stud_apps.status = look_up.code ' ;
    vc_query_1 := vc_query_1 || ' AND look_up.type = ''st''' ;
    vc_query_1 := vc_query_1 || ' AND stud_apps.job_no = ''' || vn_appln_list.job_no || ''' ' ;
    vc_query_1 := vc_query_1 || ' ORDER BY appl_date' ;
    dbms_output.put_line('Executed Query_2');
    OPEN or_applicants_list FOR vc_query_1;
    LOOP
    FETCH or_applicants_list INTO vn_job_offered;
    EXIT WHEN or_applicants_list%NOTFOUND;
    va_varray_job_detail(counter).APPL_NO := vn_job_offered.APPL_NO;
    va_varray_job_detail(counter).S_FNAME := vn_job_offered.S_FNAME;
    va_varray_job_detail(counter).S_MI := vn_job_offered.S_MI;
    va_varray_job_detail(counter).S_LNAME := vn_job_offered.S_LNAME;
    va_varray_job_detail(counter).APPL_DATE := vn_job_offered.APPL_DATE;
    va_varray_job_detail(counter).DESCRIPTION := vn_job_offered.DESCRIPTION;
    va_varray_job_detail(counter).S_UCID := vn_job_offered.S_UCID;
    counter := counter + 1;
    END LOOP; --end of FOR
    CLOSE or_applicants_list;
    END LOOP; -- end of FETCH
    END Admin_Jobs_Offered_Rtr;
    END PACK_SEMSADMIN_OFFEREDJOBS;
    /{color}
    Reqire help plzzzz !!!
    Thanks.

    Originally posted by JDBC Development Team:
    It's very similar to other datatype except that it uses OracleTypes.ARRAY typecode and the value is mapped to a oracle.sql.ARRAY instance. The code looks as follows --
    cstmt.registerOutParameter (idx, OracleTypes.ARRAY, "VARRAY_TYPE_NAME_HERE");
    cstmt.execute ();
    ARRAY array = (ARRAY) cstmt.getObject (idx);
    Thanks for your reply.
    I have to use:-
    OracleCallableStatement cs1 = (OracleCallableStatement )conn.prepareCall
    ( "{call proj_array(?)}" ) ;
    for retrieving a collection as an OUT parameter.
    This gives me the errors:-
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Blob getBlob(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Array getArray(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Clob getClob(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Ref getRef(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    How do I get rid of these errors?
    null

  • Stored procedure with cursor as out parameter

    Can any one help me by showing how to write a procedure with cursor as out parameter and caputuring it in java using jdbc.
    Thanks in advance,
    shravan bharadwaj

    I know that in the SQLJ distribution (which is also downloadable) there is an example in the demo directory called RefCursDemo that shows the SQL code and how to call it - albeit from SQLJ and not JDBC. There may also be a demo in the JDBC distribution, though I am not sure about that.

  • How to call procedure in which one formal parameter is associative array ty

    how to call procedure in which one formal parameter is associative array type,
    pls explain with eg.

    >
    above code work fine but when i use case then it give error like
    i identifier should be declare
    & my code is as
    CASE v_array(i)
    WHEN 'A' THEN
    insert into di_ivpn_report (ID, test_name, table_name, status, entity, proposition)
    values (v_att_id, v_att_name, 'DI_'||v_array(i)||'_REPORT'||'_'||v_att_id,
    v_status, v_ent_name, v_array(i));
    WHEN 'B' THEN
    insert into di_mpls_report (ID, test_name, table_name, status, entity, proposition)
    values (v_att_id, v_att_name, 'DI_'||v_array(i)||'_REPORT'||'_'||v_att_id,
    v_status, v_ent_name, v_array(i));
    END CASE;
    >
    Then you have to use ordinary loop
    PROCEDURE insert_update_***_array (TRANID IN VARCHAR2, ATT_NAME IN VARCHAR2, ENT_NAME VARCHAR2, v_array IN ***_array)
      IS
        v_tranid VARCHAR2(1);
        v_att_name VARCHAR2(100) := ATT_NAME;
        v_ent_name VARCHAR2(100) := ENT_NAME;
        v_att_id VARCHAR2(6);
        v_ent_id NUMBER;
        v_status VARCHAR2(20) DEFAULT 'INACTIVE';
        I        NUMBER;
       BEGIN
        i := v_array.first;
        while i is not null loop
          CASE v_array(i)
          WHEN 'A' THEN
            insert into di_ivpn_report (ID, test_name, table_name, status, entity, proposition)
            values (v_att_id, v_att_name, 'DI_'||v_array(i)||'_REPORT'||'_'||v_att_id,
            v_status, v_ent_name, v_array(i));
          WHEN 'B' THEN
            insert into di_mpls_report (ID, test_name, table_name, status, entity, proposition)
            values (v_att_id, v_att_name, 'DI_'||v_array(i)||'_REPORT'||'_'||v_att_id,
            v_status, v_ent_name, v_array(i));
          END CASE;     
          i := v_array.next(i);
        end loop; 
    end;

  • How can I Create function with an  out Parameter

    how all
    how can I Create function with an out Parameter
    I try to create it it sucess but how can I CALL it , it give me error
    please I want A simple example
    thanks

    3rd post on same question by same user :
    Re: how can I Create function with an  out Parameter
    how can I Create function with an  out Parameter

  • Calling a stored procedure with VARRAY as out parameter using JDBC

    Hi,
    I want to use the data type VARRAY as an out parameter in an Oracle stored procedure. I want to call the stored procedure from
    my java program using JDBC.
    I'm using Oracle 8.1.5 for Windows NT.
    Please help me.
    Thanks
    Sumanta
    null

    Originally posted by JDBC Development Team:
    It's very similar to other datatype except that it uses OracleTypes.ARRAY typecode and the value is mapped to a oracle.sql.ARRAY instance. The code looks as follows --
    cstmt.registerOutParameter (idx, OracleTypes.ARRAY, "VARRAY_TYPE_NAME_HERE");
    cstmt.execute ();
    ARRAY array = (ARRAY) cstmt.getObject (idx);
    Thanks for your reply.
    I have to use:-
    OracleCallableStatement cs1 = (OracleCallableStatement )conn.prepareCall
    ( "{call proj_array(?)}" ) ;
    for retrieving a collection as an OUT parameter.
    This gives me the errors:-
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Blob getBlob(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Array getArray(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Clob getClob(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Ref getRef(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    How do I get rid of these errors?
    null

  • How can you type without using capitals at the beginning of a sentence?

    How can you type something without using a capital letter at the beginning of a sentence. It always automatically outs a capital letter and I don't want one because it could be a case sensitive password?

    Tap the Shift key to turn off caps

  • How to access data without using authorization variable in report?

    Hello All,
    I am using two varibles in report, without using exit varible in report how to get the data based values enter in the ohter variable.
    How to find the roles and display the data " with out using the concept called varible used in report"

    Sorry..for late response.
    Answers to your questions:-
    Previous day to current date.
    I tried to follow steps given in the following link but failed as we have Teradata as data source and I dont know how to write a syntax for teradata similar to what is explained by Dave.
    http://www.dagira.com/2007/08/22/dynamic-dates-part-i-yesterday-and-today/
    Regards

  • Invoking Stored procedures without using CallableStatement

    I have a piece of code:
    import java.sql.*;
    public class Somenath{
    public static void main(String args[])throws ClassNotFoundException,SQLException{
    String abc;
    String query="{ call PR_EXAMPLE_I(?,?) }";
    String name="TEST FUND 2";
    Connection con = null;
    Class.forName("oracle.jdbc.driver.OracleDriver");
    con=DriverManager.getConnection("jdbc:oracle:thin:@172.16.31.120:1521:ora9db","gs2","gs2");
    Statement statement=con.createStatement();
    CallableStatement cs = con.prepareCall(query);
    cs.registerOutParameter(2,Types.VARCHAR);
    cs.setString(1,name);
    cs.execute();
    String nameval=cs.getString(2);
    System.out.println("Name"+nameval);
    try{
    finally{
    cs.close();
    This code works fine.
    I would like to know wheather its possible to execute a stored procedure using the
    statement.execute()/statement.executeQuery().Please note as per Java's documentation statement.execute() may be used execute any unknown SQL String.So is it possible to execute a stored procedure thats already existing(say PR_EXAMPLE_I in the current example).

    Thank you Digital Dreamer for ur help.I will explain the problem in detail.
    Well I wish to invoke a stored procedure that uses a in paramater but no out parameter.Assume that the stored procedure (say abc) already exists in the system.We execute a Select statement inside the Stored procedure and copy the value in a block-variable(a local one) within the Stored Procedure.
    Usually we execute the stored procedure in the SQL Prompt using
    SQL> exec Proc_Name(In Paramter)
    I would like to know how do I do it in JDBC using Statement.(Please note that we are not using Callable Statement)
    Can u help me out with an example?

  • Dreamweaver: how to view file without checking it out?

    I have started using the Check-In/Check-Out feature of
    Dreamweaver 2004. Sometimes I want to view a .cfm file without
    checking it out. I thought the "Get" command might let me do this,
    but the file contents don't display. So how do I view the contents
    of a checked-in file without checking it out?
    Thanks.

    I always use file/open, but then again, I have never checked
    out a file in my life.

Maybe you are looking for