How to call SP containing Temp table in IReport

hi folks
i m trynig to call a stored procedure using IReport and there is no
problem with that and the procedure gets called ....
but if that procedure has a temporary table then I cannot get the records in my Report....
So if any one of you have tried the same plz let me know

Hi
I am facing problem in calling the stored procedure in IReport. I have prepared a procedure in Oracle and in Ireport i am calling it in report query as
call TEST('001')
exec TEST('001')
also TEST('001')
In all three scenarios i got Invalid SQL. I am using IReport ver 1.2.2
Please let me know what is the exact way of calling stored procedure. Please help me ..i am in greate need of it.
Bhaskar

Similar Messages

  • How to call driver program internal table in a form

    how to call driver program internal table in a form? Given below is my code
    TABLES: VBRK,VBAK,ADRC,KNA1,VBRP,VBAP,J_1IMOCOMP.
    DATA: BEGIN OF IT_CUST_ADD OCCURS 0,
    STREET LIKE ADRC-STREET,
    NAME LIKE ADRC-NAME1,
    POST_CODE LIKE ADRC-PSTCD1,
    CITY LIKE ADRC-CITY1,
    CUST_TIN LIKE KNA1-STCD1,
    END OF IT_CUST_ADD.
    DATA: BEGIN OF IT_IN_DA OCCURS 0,
    VBELN LIKE VBRK-VBELN,
    FKDAT LIKE VBRK-FKDAT,
    END OF IT_IN_DA.
    now suppose these are my internal table. what should i write in FORM INTERFACE (associated type)

    Hi Sashi, this will solve ur problem.
    Check the below link.
    REG:PEFORM IN SCRIPT
    kindly reward if found helpful.
    cheers,
    Hema.

  • How to create a unique temp table then automatically remove after the join?

    i have many users simultaneously accessing the web apps.
    my problem is on how to solve the SELECT WHERE IN('..') clause..
    i've read a lot of threads that with the same option..
    1) open connection and start transaction
    2) create temp table
    3) insert the data (batch insert)
    4) do the main goal. SELECT JOIN or SELECT WHERE IN(SUBQUERY).
    5) end transaction and close connection
    how do I assure that the created temp table was remove/drop upon 5) ?
    thanks a lot..

    You can do this using global temporary tables. Also data from temporary table will be automatically deleted after commit but table will remain.
    e.g.
    CREATE GLOBAL TEMPORARY TABLE today_sales
    ON COMMIT DELETE ROWS
    AS SELECT * FROM orders WHERE order_date = SYSDATE;
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/tables.htm#i1006400
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7002.htm#i2153132
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7002.htm#i2153132
    Regards
    Rajesh
    Edited by: Rajesh on Jun 10, 2010 3:34 PM

  • How i can disable MONITORING temp tables

    In the Oracle 10 g database stats are gathering using
    Gtaher_stats_job
    current setting is statictics _level =Typical
    i need to disable the monotoring for temp tables
    i try this command it will not change
    ALTER TABLE "RDC"."INV_TEMP"
    NOMONITORING
    How i can disable this , i read some artikel this feature is disabled in oracle 10g
    how i can disable
    tks
    rda

    Justin Note
    I would suggest that this is probably a bad idea, though. If there are no statistics on an object,
    you're basically asking the CBO to work blind. Why not gather statistics after loading a fresh set of data
    into the table?
    I am running stats once a week , so i cannnot gather fresh set of dataNicolas
    setting stats to a given value and lock them (to be not set to 0 by any gather stat process) may help as well.
    Justin
    Nicolas.
    I cannot understand this >>to be not set to 0 by any gather stat processOk my process as follows
    through sqlldr i load a data to temp table , i have a after insert trigger
    once the data insert into temp table it check for some condition and
    fire this trigger and insert into Permanent Table,
    After the process finished the temp table truncated.
    this whole process running every day .
    I already mention stats are collected once a week , no point i keep the stats
    for this temp table and suppose if i keep , it will give wong execution plan
    and insert into this temp tabel will be slow -- am i right in this step
    This is the reason i dont want stats at all in temp table
    Thanks Justin & Nicolas
    Best rds

  • How can I use Indexed Temp tables to optimize performance?

    Instead of joining two CTEs together, I am now going to attempt to join two indexed temp tables. 
    The first temp table is a number of encounters that returns 147 rows in 2 seconds. The second temp table
    is progress notes for all those encounters returning 136 rows in 18 seconds. Joining the indexed views comes back at 3 1/2 minutes.
    What can I do to optimize performance?
    Code is below. Thanks in advance!
    if object_id('tempdb..#arpb') is not null begin drop table #arpb end;
    if object_id('tempdb..#progress_notes') is not null begin drop table #progress_notes end;
    SELECT DISTINCT
    ARPB.PAT_ENC_CSN_ID, ARPB.SERVICE_DATE, ARPB.BILLING_PROV_ID, ARPB.DEPARTMENT_ID,
    SER.PROV_NAME, DEP.DEPARTMENT_NAME, E.APPT_TIME, ZC_APPT.NAME AS APPT_STATUS
    INTO #arpb
    FROM ARPB_TRANSACTIONS ARPB
    LEFT OUTER JOIN CLARITY_SER AS SER ON SER.PROV_ID = ARPB.BILLING_PROV_ID
    LEFT OUTER JOIN CLARITY_DEP AS DEP ON DEP.DEPARTMENT_ID = ARPB.DEPARTMENT_ID
    LEFT OUTER JOIN PAT_ENC AS E ON E.PAT_ENC_CSN_ID = ARPB.PAT_ENC_CSN_ID
    LEFT OUTER JOIN ZC_APPT_STATUS AS ZC_APPT ON ZC_APPT.APPT_STATUS_C = E.APPT_STATUS_C
    WHERE ARPB.DEPARTMENT_ID = xxxx
    AND ARPB.TX_TYPE_C = 1
    AND ARPB.VOID_DATE IS NULL
    AND ARPB.BILLING_PROV_ID = xxxx
    AND ARPB.SERVICE_DATE BETWEEN
    'xxxx' AND 'xxxxx'
    create clustered index idx_temp_arpb on #arpb(PAT_ENC_CSN_ID)
    SELECT DISTINCT
    ARPB.PAT_ENC_CSN_ID,
    ZCNT.NAME AS NOTE_TYPE, PR.NAME AS PURPOSE, HNO_INFO.NOTE_ID,
    EMP.NAME AS EMP_NAME, STS.NAME AS NOTE_STATUS
    INTO #progress_notes
    FROM ARPB_TRANSACTIONS ARPB
    LEFT OUTER JOIN ENC_NOTE_INFO AS ENC_NOTE_INFO ON ARPB.PAT_ENC_CSN_ID = ENC_NOTE_INFO.PAT_ENC_CSN_ID
    LEFT OUTER JOIN HNO_INFO AS HNO_INFO ON ENC_NOTE_INFO.ENCOUNTER_NOTE_ID = HNO_INFO.NOTE_ID
    LEFT OUTER JOIN ZC_NOTE_TYPE AS ZCNT ON ZCNT.NOTE_TYPE_C = ENC_NOTE_INFO.NOTE_TYPE_C
    LEFT OUTER JOIN ZC_NOTE_PURPOSE AS PR ON PR.NOTE_PURPOSE_C = HNO_INFO.NOTE_PURPOSE_C
    LEFT OUTER JOIN CLARITY_EMP AS EMP ON EMP.EPIC_EMP_ID = HNO_INFO.CURRENT_AUTHOR_ID
    LEFT OUTER JOIN ZC_NOTE_STATUS AS STS ON STS.NOTE_STATUS_C = ENC_NOTE_INFO.NOTE_STATUS_C
    WHERE ARPB.DEPARTMENT_ID = xxxx
    AND ARPB.TX_TYPE_C = 1
    AND ARPB.VOID_DATE IS NULL
    AND ARPB.BILLING_PROV_ID = xxxx
    AND ZCNT.NAME = 'xxxx'
    AND ARPB.SERVICE_DATE BETWEEN
    'xxxx' AND 'xxxx'
    AND PR.NAME = 'xxxxx'
    create index idx_temp_pn on #progress_notes(PAT_ENC_CSN_ID)
    SELECT
    #arpb.PAT_ENC_CSN_ID,
    #arpb.APPT_TIME,
    #arpb.SERVICE_DATE,
    #arpb.BILLING_PROV_ID,
    #arpb.PROV_NAME,
    #arpb.DEPARTMENT_ID,
    #arpb.DEPARTMENT_NAME,
    #progress_notes.EMP_NAME as NoteEmp,
    CASE #progress_notes.NOTE_ID
    WHEN null THEN 'No Progress Note'
    ELSE #progress_notes.NOTE_ID
    END as NoteId,
    #progress_notes.NOTE_STATUS,
    #progress_notes.NOTE_TYPE,
    #progress_notes.PURPOSE
    FROM #ARPB
    LEFT JOIN #PROGRESS_NOTES ON #ARPB.PAT_ENC_CSN_ID = #PROGRESS_NOTES.PAT_ENC_CSN_ID
    To err is human, to REALLY foul things up requires a computer

    Something is not right here. What is the type of that column in both temp tables?
    I would assume that joining 147 and 136 rows should be done in less than 1 sec. even without indexes.
    How did you measure the time?
    BTW, I suggest to use aliases in your last query - it will be easier to read. Also use COALESCE function instead of CASE for the Note_ID (BTW, is Note_ID a character column - otherwise you supposed to get an error).
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • How to call dynamically TablerowCount using Table view

    Please help me urgent

    I have one abc.htm view
    ==================
    <htmlb:group>
            <htmlb:groupBody>
             <htmlb:tableView
                                                id = "tv1"
                                                columnHeaderVisible = "TRUE"
                                                design = "alternating"
                                                fillUpEmptyRows = "TRUE"
                                                footerVisible = "TRUE"
                                                headerVisible = "TRUE"
                                                table = "<%= t_maintain %>"
                                                iterator = "<%= iterator %>"
                                                visibleRowCount = "<%=model->G_NO_SIMILARSUBNO%>"
                                                width = "100%"
                                                selectionMode="singleSelect"
                                                filterButtonText = "Go"
                                                filterButtonTooltip = "Filter content"
                                                tableLayout = "AUTO"
                                              />
    In this view i want to call   visibleRowCount = "12".. User is going to give this rowcount dynamically through his page textbox.. How can i do this ?How can i paas the counting variable here..

  • How do i insert into temp table

    Hi ALL,
    I have a table APP
    APP_I Acronym Desc
    1 ACC Accounts
    PLTFRM
    swr_pltfrm_i swr_pltfrm_x swr_pltfrm_typ_x
    1 AIX-JAVA Execution
    2 COBOL/BATCH Execution
    3 COBOL/CICS Execution
    4 CONSULTWORKS/MOBILE Delivery
    5 CONSULTWORKS Delivery
    PLTFRM_APP_ENVT
    swr_pltfrm_i app_i
    1 1
    2 1
    3 1
    4 1
    5 1
    I want to create one temporary tab
    TEMP_insert(app_i,desc, acrnymc ,delivery,execution) which have this columns
    App_i desc acrnymc execution
    1 Accounts ACC AIX-JAVA,COBOL/BATCH,COBOL/CICS
    delivery
    CONSULTWORKS,CONSULTWORKS/MOBILE
    How do i insert the row in to the Temp_Insert table based on APP_I as input to my stored procedure.
    Thanks

    hopefully this will help
    dev>declare
      2      cursor c is select empno,ename,job from emp where deptno=20 and rownum<3;
      3      str varchar2(100);
      4  begin
      5      for cur in c loop
      6          str:=str||' '||cur.ename||' '||cur.job;
      7      end loop;
      8      insert into emp_test (ename) VALUES(str);
      9  end; 
    10  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    dev>select ename from emp_test;
    ENAME
    SMITH CLERK JONES MANAGER
    [pre                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • DB: Handling temp tables

    Another DB question...
    We have a function that grabs a random record from a table
    using a stored
    procedure (MS SQL):
    CREATE PROCEDURE dbo.sp_randomJudge_district
    @Dist int
    AS
    -- Create a temporary table with the same structure of
    -- the table we want to select a random record from
    /* Clean up */
    If exists (select * from tempdb.dbo.sysobjects where
    substring(name,1,22) =
    '##TempRandomJudgeTable')
    Drop Table ##TempRandomJudgeTable
    CREATE TABLE ##TempRandomJudgeTable
    GO
    On occasion, we get this error:
    Error accessing Database.
    There is already an object named '##TempRandomJudgeTable' in
    the database.
    Microsoft OLE DB Provider for SQL Server
    It appears that sometimes the procedure is called before the
    temp table is
    deleted from the previous call of the function, but the first
    part of the
    procedure is to check for that, and delete it if it's there.
    Hence, I'm a
    bit confused.
    =================================================================
    Win prizes searching google:
    http://www.blingo.com/friends?ref=hM72-GU3FWzMFnTqhv-2GE1FNtA

    "darrel" <[email protected]> wrote in message
    news:eln6t7$n48$[email protected]..
    >> Ok - first, do NOT use sp_ to prefix stored
    procedures; that's reserved.
    >> If you MUST use a prefix, use usp_ instead.
    >
    > Oh!? I've just been using the established protocol that
    was here before I
    > got here. I'll need to look into that. ;o)
    >
    If your established protocal uses tbl, fld, etc, then throw
    the whole thing
    out.
    This is not C++, and you're not writing software. If you
    don't know a table
    from a column from a procedure, you shouldn't be writing SQL
    queries. ;)
    All ribbing aside, sp_ is used to denote system (not stored)
    procedures. If
    you call a procedure with sp_ in the name, SQL Server will
    first check the
    master database (regardless of which database you've
    specified in your
    connection or with a USE command), then only check the
    current database if
    the procedure is not found in master.
    It's a tick off your performance, and if you happen to have a
    procedure with
    the same name in master...

  • How do i insert into more than one table from temp table?

    Hi,
    I have three tables such as temp,stck and stol
    temp table contains data as below. It has 22 columns.
    STOCK     STOCKDESC     ALIAS1     ALIAS2     ALIAS3     ALIAS4     ALIAS5     ALIAS6     ALIAS7     ALIAS8     ALIAS9     ALIAS10     ALIAS11     ALIAS12     ALIAS13     ALIAS14     ALIAS15     ALIAS16     ALIAS17     ALIAS18     ALIAS19     ALIAS20
    bmg667691031      NOWE FINANSE LTD     yy     zz     B282DV3      TESTICKER      te     te1     bmg667691031BM     te     707943W     ex     IR-PRIME     IR-ALTID     IR-BLOOM     NT-PRIME     NT-ALTID     NT-BLOOM     AU-PRIME     AU-ALTID     AU-BLOOM     mm
    AA0098000181      UFACEX HOLDINGS VAR RT DUE 06-30-2010     kk     yy     mm     TESTICKER      aa     ff     AA0098000181GB     bb     031969W     cc     IR-PRIME     IR-ALTID     IR-BLOOM     NT-PRIME     NT-ALTID     NT-BLOOM     AU-PRIME     AU-ALTID     AU-BLOOM     ba
    AC1350Z7M923      CDA GOVT TREAS BILLS CDS- 08-05-2010     ee     ff     gg     TESTICKER      hh     ij     AC1350Z7M923CA     mn     1A1MTLU     op     IR-PRIME     IR-ALTID     IR-BLOOM     NT-PRIME     NT-ALTID     NT-BLOOM     AU-PRIME     AU-ALTID     AU-BLOOM     op
    stck table contains as below.It has six columns. But always first three columns will have values.
    stock_id   stock_code stock_description              stock_type terriory_code preferred code
    1185072     AED                    
    1185073     ARA     CURRENCY ARGENTINA PESO               
    1185074     ATS     CURRENCY AUSTRIAN SCHS     
    stol table contains as below. It has 6 columns.Terriory_code is always empty.
    stock_code        territory_code    stol_type stock_id  stck_code_type sys_entry_date
    AED          0 1185072     0     6/22/2007 3:59:13.000 PM
    ARA          0 1185073     0     6/22/2007 3:59:13.000 PM
    ATS          0     1185074     0     6/22/2007 3:59:13.000 PM
    Now, i want to insert into stck and stol table based on temp table records. constraints to insert into stck and stol tables are as below
    In temp table first column is called stock. This stock has to compare with stck table stock_code. If it is not present in stck table, then it has to insert into stck table with stock_id and stock_description. Here, I need to generate stock_id my self in the code.
    In temp table, column 3 to column 22, i have alias. Each column has to check with stol table stock_code column. For instance, column3 check with stock_code column. Then column4 check with stock_code. If stock_code is not present in stol table, then i have to insert into stol table.
    I need to generate stock,id in the code. How do i perform this insertion?
    Edited by: user12852882 on Jun 12, 2010 2:37 AM

    It can be done using SQL (no loops required)
    insert into stock_table (stock_id,stock_code,stock_description)
    select stock_id,get_stock_code,stockdesc  /* get_stock_code is a function providing stock_code - usually a sequence value */
      from (select t.stock stock_id,t.stockdesc,s.stock_id stock_stock_id
              from temp_table t,stock_table s
             where t.stock = s.stock_id(+)
    where s.stock_id is null;
    insert into stol_table (stock_code,sys_entry_date) /* not clear where other values to be inserted will come from */
    select stock_code,sysdate
      from (select t.stock_code,s.stock_code stol_stock_code
              from (select distinct stock_code
                      from (select alias1 stock_code from temp_table union all
                            select alias2 from temp_table union all
                            select alias3 from temp_table union all
                            select alias4 from temp_table union all
                            select alias5 from temp_table union all
                            select alias6 from temp_table union all
                            select alias7 from temp_table union all
                            select alias8 from temp_table union all
                            select alias9 from temp_table union all
                            select alias10 from temp_table union all
                            select alias11 from temp_table union all
                            select alias12 from temp_table union all
                            select alias13 from temp_table union all
                            select alias14 from temp_table union all
                            select alias15 from temp_table union all
                            select alias16 from temp_table union all
                            select alias17 from temp_table union all
                            select alias18 from temp_table union all
                            select alias19 from temp_table union all
                            select alias20 from temp_table
                           )                                           /* use unpivot instead if you are 11g */
                     where stock_code is not null
                   ) t,stol_table s
             where t.stock_code = s.stock_code(+)
    where s.stock_code is null;
    and think about damorgan's post, you'll never regret it (especially when you will not just think)
    Regards
    Etbin

  • How to call or not call a Trigger in same table based on condition?

    Hi
    How to call or not call a Trigger in below situations..
    If a table contains a record of same value i.e,
    [i[u]]ID
    1
    1
    3
    In above ID 1 is repeated for two times.
    In this situations i don't want to call a trigger..
    But, the value ID is for 3, now i want to fire a trigger.
    Based on this i want to delete in another table.
    How can I check it?
    Thanks

    Thanks for ur reply..
    The below is my scnario..
    I am having two table
    employee
    Id empcol
    101 111
    101 222
    102 444
    Department
    id deptcol
    101 457
    101 678
    102 543
    The above is my table structure no one column is PK, so i m not able create FK.
    When I am deleting from employee where id =101 and empcol=111,
    the above record is deleted.
    At present I am using After Update Trigger..
    So trigger is called and delete the id 101 in Department table.
    In my scenario i can't delete a record in Department table
    bcoz i am having id morethan 101 in employee table.
    If employee table contains one ID like 102 the Trigger should works.
    How can I check the condition After delete on employee table it contains morethan same employee id?
    The below is my Trigger..
    CREATE OR REPLACE TRIGGER CALL_TRIGGER
    AFTER DELETE ON Employee
    FOR EACH ROW
    DECLARE
    count_id pls_integer;
    BEGIN
    SELECT COUNT(*) INTO count_id from Employee WHERE ID <>:new.ID;
    IF( count_id >1) THEN
    DELETE FROM Depratment where ID=:old.ID;
    END IF;
    END;
    I am geting an error ORA-04091 table is mutuating, trigger cannot seen it.
    I had tried with package and package body also.. But no luck.
    Thanks

  • How do I CREATE IF NOT EXISTS Temp table in PLSQL?

    hello, how do I CREATE IF NOT EXISTS Temp table in PLSQL? The following table is to be created in FIRST call inside a recursive function (which you'll see in QUESTION 2).
    QUESTION 1:
    CREATE GLOBAL TEMPORARY TABLE TmpHierarchyMap
                                  Id numeric(19,0) NOT NULL,
                                  ParentId numeric(19,0) NOT NULL,
                                  ChildId numeric(19,0) NOT NULL,
    ... more ...
                             ) on commit delete rows');
    QUESTION 2: How to return a temp table from a function?
    For example, this is how I'm doing it at the moment, using Nested Table.
    EXECUTE IMMEDIATE 'CREATE OR REPLACE TYPE TmpHierarchyMapObjType AS OBJECT
                   Id numeric(19,0) ,
                   ParentId numeric(19,0),
                   ChildId numeric(19,0),
    ... more ...
         EXECUTE IMMEDIATE 'CREATE OR REPLACE TYPE TmpHierarchyMapTableType AS TABLE OF TmpHierarchyMapObjType;';
    CREATE OR REPLACE FUNCTION fnGetParentsTable
    ObjectId number,
    ObjectClassifier varchar2
    RETURN TmpHierarchyMapTableType
    IS
    TmpHierarchyMap TmpHierarchyMapTableType := TmpHierarchyMapTableType();
    ThisTempId varchar2(32);
    CURSOR spGetParents_cursor IS
    SELECT
    Id,
    ParentId,
    ChildId,
    FROM TMP_HIERARCHYMAP
    WHERE TempId = ThisTempId;
    BEGIN
    SELECT sys_guid() INTO ThisTempId FROM dual;
    spRecursiveGetParents(ObjectId, ObjectClassifier, ThisTempId);
    FOR oMap in spGetParents_cursor LOOP
    TmpHierarchyMap.Extend();
    TmpHierarchyMap(TmpHierarchyMap.Count) := TmpHierarchyMapObjType( oMap.Id
    , oMap.ParentId
    , oMap.ChildId
    END LOOP;
    DELETE FROM TMP_HIERARCHYMAP WHERE TempId = ThisTempId;
    RETURN TmpHierarchyMap;
    END fnGetParentsTable;
    QUESTION 3: what does the word GLOBAL means? I read that temp table is visible only to a particular database connection/session and will be dropped automatically on termination of the session. i can only find this information in some forum discussion but failed to locate this in Oracle doc, can someone point me in right direction please?
    Many thanks!
    REF:
    http://stackoverflow.com/questions/221822/sybase-developer-asks-how-to-create-a-temporary-table-in-oracle
    http://www.oracle-base.com/articles/8i/TemporaryTables.php

    devvvy wrote:
    so if I CREATE GLOBAL TEMPORARY TABLE twice on second pass of my recursive function what then...?You don't create it inside your function.
    You create the GTT once on your database outside of the function and then just leave it there and use it.
    Tables should not be dynamically created and dropped.
    Only other database engines such as SQL Server use the concept of creating temporary tables during the execution of code. Oracle uses a "create once, use whenever" methodology.

  • How to call a Oracle Proc,which contains Object Type as in Param, from java

    Hi
    Would like to know how to call a Oracle Procedure which contains the Object Type Parameter from java.
    Here is my code will look like...
    1. CREATE OR REPLACE TYPE emp AS OBJECT
    Empno NUMBER,
    Ename VARCHAR2(50)
    [COLOR=royalblue]In step1 I have created object type.[COLOR]
    2.CREATE OR REPLACE PACKAGE ref_pkg IS
    TYPE tab_emp IS TABLE OF emp;
    END ref_pkg;
    [COLOR=royalblue]In step2,I have created a table type which is of type emp;[COLOR]
    3. CREATE OR REPLACE PROCEDURE p_emp(p_emptab IN ref_pkg.tab_emp) as
    BEGIN
    FOR I IN 1..p_emptab.COUNT
    LOOP
    Some code written here
    END LOOP;
    END;
    [COLOR=royalblue]In step3 I have passed tabletype which is of type emp as argument.[COLOR]
    Now I need to invoke this procedure from JAVA.
    Calling a procedure doesn�t matter.
    But how I can map objecttype ? how will java recognize oracle object ?
    How can I implement this ?
    Any Help/Clues is Appreciated.
    Thanks
    Krishna

    Hi Bob
    You can call a stored proc from a database control with the jc:sql annotation itself.
    Assume a stored proc taking one In parameter
    * @jc:sql statement="call sp_updateData({id})"
    void call_sp_updateCust(int id);
    You can even call stored proc with OUT parameters using
    * @jc:sql statement="{call sp_MyProc(?, ?)}"
    void call_sp_MyProc(SQLParameter[] params)
    You can also call stored functions via db control.
    More info and diff ways to call at
    http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/controls/database/conStoredProcedures.html
    Thanks
    Vimala

  • Anyone know how to upload csv file to temp table of sybase DB from java?

    Dear All,
    I blindly need your help in achieving the following:
    I have the csv file which contains OrdId and BillId values. I just wanted to read these two values one by one from excel and loaded them into one temp table of Sybase SQL Anywhere.
    here is the sample query for your reference:
    begin tran
    create table tempdb..ordBill (ord_id int identity,bill_id int
    go
    load table tempdb..ordBill from 'c:\\test\\test.csv'Error:
    Incorrect syntax near the keyword 'table'.
    I am having only one tool Microsoft ISQL/W from which i connect to remote sybase DB and run some queries like sp_help , create etc.. from there.
    It would be great,if somebody knows the way of doing the above thru some java program. Otherwise, is there any tool like BCP required to do the above?
    Awaiting for your valuable reply
    thanks
    pannar

    Hi,
    I could connect to my Sybase DB thru java program. Can somebody help me how to upload the csv file into sybase temp table ?
    Here is the sample code:
    import java.sql.*;
    public class DBConn {
    public DBConn(){
    public static void main(String[] args) {
    try {
    //Class.forName("com.sybase.jdbc2.jdbc.SybDriver.class.getname()");
    //Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Class.forName("com.sybase.jdbc2.jdbc.SybDriver");
    String sourceURL = "jdbc:sybase:Tds:ldbd1.devo.ilx.com:5000";
    Connection conn = DriverManager.getConnection(sourceURL, "pannar", "pannar");
    //Connection conn = DriverManager.getConnection(sourceURL);
    System.out.println("Success");
    } catch (Exception e) {
    System.err.println("Got an excpetion! ");
    e.printStackTrace();
    }

  • How to call Subroutines,Standard Text  & using Internal Table in SmartForm

    Hi all,
    need help in the following areas.Its very urgent!
    1.How to CAll Subroutines in Smart Forms
    2.How to CAll Standard Text in Smart Forms
    Situation:
    We have an Internal Table T_SALES with all the data which am going to display in the smartform,How to retrive data from an internal table in Smart forms
    Any Help in this direction would be highly appreciated.
    Regards
    Ramu

    Hi,
      When you are using quantity or currency fields, you have to mentiong the reference fileds in a tab called CURRENCY/QUANTITY FILEDS in the GLOBAL DATA node.
    Specifying a Currency or Quantity Reference
    Use
    In the ABAP Dictionary, you can assign a currency or quantity field to a table field. In the output of these fields, the system can then insert the relevant currency or unit:
    ·        If the value field is in the same table as the corresponding currency or quantity field, the system recognizes the reference automatically, and formats the value field according to the currency or unit in the assigned field.
    ·        If the value field is in a different table from the currency or quantity field, the system cannot recognize this reference automatically.
    In the second case, you must indicate this reference to the system in the form, to ensure that the value field is formatted correctly.
    Procedure
    You want to assign a currency or quantity field in one table (for example, CURTAB) to a value field in another table (for example, VALTAB).
           1.      Create the reference to the currency field by entering the following values:
    -         Field Name: VALTAB-VALUE, if this is the value field of VALTAB that you want to display.
    -         Reference Field: CURTAB-CURRENCY, which is the currency field of CURTAB.
           2.      Under Data Type, specify whether the data type is a currency or quantity.
    Result
    In the output of the PDF-based print form, the system formats the value field VALTAB-VALUE according to the assigned value in the currency or quantity field of the global variable CURTAB-CURRENCY.
    Thanks and Regards,
    Bharat Kumar Reddy.V
    Message was Added by: Bharat Reddy V
    Message was Added by: Bharat Reddy V

  • How can I store a form name with path and then call form from a table

    Is it possible that any form that I built I store that form in some table in DB and then call that form from table, if yes, then how can i get this functionality. I am not very experience in form and do not know if it can be done because i think if it is possible then this can be a good security for application and easy to handle as well.
    Thanks in advance
    Maz

    If you have a Forms block based on this table:
    declare
      module varchar2(100);
    begin
      module := :block.column;
      call_form ( module ) ;
    end;If you don't have any blok based on that table
    declare
      module varchar2(100);
    begin
      select  module_name
      into module
      from ...
      where ...
      call_form ( module ) ;
    end;Francois

Maybe you are looking for