DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: inserting into temp table

  1. #1
    Join Date
    Apr 2003
    Posts
    19

    inserting into temp table

    hi
    the following stmt is not executing while it is procedure ,but it is gertting executing when we run individually ie. executing it out of proc.

    INSERT INTO TEMP_ACC_DET
    select amt.txn_date,
    amt.txn_type,
    amt.units_involved units_involved,
    amt.nav nav,
    amt.pop pop,
    amt.gross_amount gross_amount,
    amt.net_amount net_amount,
    txn_source,
    fund_option,
    ref_txn_no,
    inflow_outflow_flag,
    account_number,
    txn_status
    from account_master_trace amt
    where amt.account_number= '1550000081225'
    AND TXN_DATE BETWEEN '01-jan-1993' AND '30-oct-2003'
    AND (TXN_STATUS NOT IN('R','CHEQUE RETURNED') AND TXN_DATE<'01-APR-2003');
    please help me.
    the script for temp table is as follows.
    CREATE GLOBAL TEMPORARY TABLE TEMP_ACC_DET
    (
    TXN_DATE DATE,
    TXN_TYPE VARCHAR2(7),
    UNITS_INVOLVED NUMBER(20,3),
    NAV NUMBER(20,9),
    POP NUMBER(20,9),
    GROSS_AMOUNT NUMBER(20,9),
    NET_AMOUNT NUMBER(20,9),
    TXN_SOURCE VARCHAR2(5),
    FUND_OPTION VARCHAR2(6),
    REF_TXN_NO VARCHAR2(10),
    INFLOW_OUTFLOW_FLAG VARCHAR2(1),
    ACCOUNT_NUMBER VARCHAR2(13),
    TXN_STATUS VARCHAR2(40)
    )
    ON COMMIT PRESERVE ROWS;
    sknaidu

  2. #2
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Hmmm, no information other than "it's not working" -- error messages? symptoms?

    I notice immediately that you are comparing dates to strings, eg ... TXN_DATE<'01-APR-2003'

    Change these to TXN_DATE
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width