Error in Creating temperory tables

Hi All,In my process i am creating some temp tables in run time ,if process execution fails in only few temp tables are created,t will again throw error as table already exists,so i need to check the table was existed or not ,if table exists then i need to drop and create new temp table for that i wrote below case statement in procedure but i will throwing error as missing expression,please suggest me is it right if its wrong guide me the other alternatives ,Thanks in Advance...
SELECT CASE WHEN TABLE AS TEMP1 THEN DROP TABLE TEMP1
ELSE
CREATE TABLE TEMP1 AS SELECT COL1,COL2,COL3 FROM XYZ
END
FROM DUAL

Hi,
Here is a set of examples to choose from. http://stackoverflow.com/questions/1799128/oracle-if-table-exists
Hope this helps.
Regards,
Michael Rainey

Similar Messages

  • Creating Temperory Table For SQL Performance.

    Hi,
    I have a SQL query,
    SELECT NVL(SUM(S.STDY_EFFORTS * K.PERCENTAGE_VALUE / 100), 0)
    FROM effort_t S, FULL OUTER JOIN role_dtls_t K
    ON S.DEAL_DETAIL_ID = K.DEAL_DETAIL_ID
    AND S.TOWER_ID = S.TOWER_ID
    AND S.SUBTOWER_ID = K.SUBTOWER_ID
    AND S.LOCATION_ID = K.LOCATION_ID
    AND S.CLIENT_ROLE_ID = K.CLIENT_ROLE_ID
    AND S.CLIENT_ROLE_ID = :B2
    AND S.EMP_CATEGORY_ID = :B1
    AND S.EMP_CATEGORY_ID = K.EMP_CATEGORY_ID
    AND S.STATE_ID = K.STATE_ID
    AND S.YEAR_NO = K.YEAR_NO
    WHERE K.DESIGNATION_ID IN
    (SELECT D.DESIGNATION_ID
    FROM PRC_VNDR_DESGN_TYPE_MSTR_T D
    WHERE D.DESIGNATION_ID = K.DESIGNATION_ID
    AND D.SENIORITY_FLAG = 'N')
    AND S.DEAL_DETAIL_ID = :B7
    AND S.TOWER_ID = :B6
    AND S.SUBTOWER_ID = NVL(:B5, S.SUBTOWER_ID)
    AND S.LOCATION_ID = NVL(:B4, S.LOCATION_ID)
    AND S.YEAR_NO = :B3
    GROUP BY S.DEAL_DETAIL_ID, S.TOWER_ID, S.YEAR_NO
    My effort_t table is having huge data thats y this query is taking lot of time to execute.Due to thIS performance issue Can I create temperory tableS on this two tables effort_t and role_dtls_t .
    If Icreate a temperory table how i get data from this two tables in to the temperory tables.
    Thanks

    Fasy wrote:
    My effort_t table is having huge data thats y this query is taking lot of time to execute.Due to thIS performance issue Can I create temperory tableS on this two tables effort_t and role_dtls_t .
    If Icreate a temperory table how i get data from this two tables in to the temperory tables.
    ThanksCreating a temporary table is most likely not going to increase performance to be honest. Your best bet would be to tune your query. See the following thread:
    {message:id=9360003}

  • Error while creating temporary table

    Hi All,
    I am trying to integrate ODI and BAM . I have followed all the steps given in the guide.While creating interface i am getting the error while LKM is working.
    I am using LKM SQL to SQL and IKM Oracle BAM Insert ( as the inserted data should be captured after inserting).
    http://download.oracle.com/docs/cd/E12839_01/integration.1111/e10224/bam_odi.htm
    Please use this link for clarification.For me drop work table and create work table failed (C$ -work table). Anyone have any idea about this could you help me?
    Thanks in advance,
    Gnanaprakasam

    It seems the table(MMMORDERFILE_C$_REQUEST ) already exist in the work schema,so cant able to create and throw an error. can you tell me which KM you are using?

  • Error while creating new table

    Hi
    First I had deleted one custom table. Then I try to create the same table with different fields. Now I am gettinh the errors.
    1.    ZLV_COMP_TABLE: Inconsistency DD <-> DB (check table with analysis tool)
    2.   A table called ZLV_COMP_TABLE exists in the database
    3.   No active nametab exists for ZLV_COMP_TABLE
    4.   Termination due to inconsistencies
    5.  Table ZLV_COMP_TABLE (Statements could not be generated)
      6.  Error number in DD_DECIDE (9)
    Please help me ... how can I create a table with same name.
    thanks
    Subhankar

    Hello,
    goto SE14 -- Give the table name
    use Tables Radio button
    click on Edit
    check the Delete Data Radio button
    click on ACTIVATE AND ADJUST DATABASE.
    Now check the table in SE11.
    If it still exits you can change the same table or Delete it again & create a new table with Same Name.
    This might help your query.
    Anil.

  • Error while creating database table

    Hi
    I am creating a table with 2 key fields of length 255 chars each. its giving me error Key field is greater than 780. Please suggest.
    Regards
    Aditya

    Hi,
    Since table key can be max of 255 length,we rarely make use of a single key field of 255,
    so, reduce the length of field.
    Constraints
    All the key fields of a table must be stored together at the beginning of the table. A non-key field may not occur between two key fields.
    A maximum of 16 key fields per table is permitted. The maximum length of the table key is 255.
    If the key length is greater than 120, there are restrictions when transporting table entries. The key can only be specified up to a maximum of 120 places in a transport. If the key is larger than 120, table entries must be transported generically.
    A table may not have more than 249 fields. The sum of all field lengths is limited to 1962 (whereby fields with data type LRAW and LCHR are not counted).
    Fields of types LRAW or LCHR must be at the end of the table. Only one such field is allowed per table. There must also be a field of type INT2 directly in front of such a field. The actual length of the field can be entered there by the database interface.
    Edited by: Sreesudha Gullapalli on Feb 6, 2009 8:19 AM

  • Error while creating external table

    Hi i tried to create external table. The table is created but while selecting that table it is throwing below errors
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file Countries1.txt in EXT_TABLES not found
    ORA-06512: at "SYS.ORACLE_LOADER", line 19I've created temp directory in window under oracle directory " C:\oracle\product\10.2.0\temp"
    In the temp directory i've a text file countries1.txt
    the text file has the below information
    ENG,England,English
    SCO,Scotland,English
    IRE,Ireland,English
    WAL,Wales,WelshI've connected to system user and created one directory and granted the read and write permissions to user SCOTT.
    SQL> create or replace directory ext_tables as 'C:\oracle\product\10.2.0\temp\';
    Directory created.
    SQL> grant read,write on directory ext_tables to scott;
    Grant succeeded.The creation of external table query is
    CREATE TABLE countries_ext (
      country_code      VARCHAR2(5),
      country_name      VARCHAR2(50),
      country_language  VARCHAR2(50)
    ORGANIZATION EXTERNAL (
      TYPE ORACLE_LOADER
      DEFAULT DIRECTORY ext_tables
      ACCESS PARAMETERS (
        RECORDS DELIMITED BY NEWLINE
        FIELDS TERMINATED BY ','
        MISSING FIELD VALUES ARE NULL
          country_code      CHAR(5),
          country_name      CHAR(50),
          country_language  CHAR(50)
      LOCATION ('Countries1.txt')
    PARALLEL 5
    REJECT LIMIT UNLIMITED;And the error is
    SQL> select *from countries_ext;
    select *from countries_ext
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file Countries1.txt in EXT_TABLES not found
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    SQL> Please help me in this

    You are missing something. Most probably the file does not exists in your specified path. This is working in my 10.2.0.3
    Step1: Check the file is actually there.
    C:\oracle\product\10.2.0>mkdir temp
    C:\oracle\product\10.2.0>cd temp
    C:\oracle\product\10.2.0\temp>dir
    Volume in drive C is C_Drive
    Volume Serial Number is 8A93-1441
    Directory of C:\oracle\product\10.2.0\temp
    07/30/2011  12:00 PM    <DIR>          .
    07/30/2011  12:00 PM    <DIR>          ..
    07/30/2011  12:00 PM                79 countries1.txt
                   1 File(s)             79 bytes
                   2 Dir(s)  50,110,582,784 bytes free
    C:\oracle\product\10.2.0\temp>type countries1.txt
    ENG,England,English
    SCO,Scotland,English
    IRE,Ireland,English
    WAL,Wales,Welsh
    C:\oracle\product\10.2.0\temp>Step 2: Creating the directory object.
    SQL> show user
    USER is "SYS"
    SQL> SELECT * FROM v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    SQL> create or replace directory ext_tables as 'C:\oracle\product\10.2.0\temp';
    Directory created.
    SQL> grant read,write on directory ext_tables to scott;
    Grant succeeded.
    SQL>Step 3: Table definition.
    C:\>sqlplus scott@orclsb/tiger
    SQL*Plus: Release 10.1.0.4.2 - Production on Sat Jul 30 12:04:24 2011
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> CREATE TABLE countries_ext (
      2    country_code      VARCHAR2(5),
      3    country_name      VARCHAR2(50),
      4    country_language  VARCHAR2(50)
      5  )
      6  ORGANIZATION EXTERNAL (
      7    TYPE ORACLE_LOADER
      8    DEFAULT DIRECTORY ext_tables
      9    ACCESS PARAMETERS (
    10      RECORDS DELIMITED BY NEWLINE
    11      FIELDS TERMINATED BY ','
    12      MISSING FIELD VALUES ARE NULL
    13      (
    14        country_code      CHAR(5),
    15        country_name      CHAR(50),
    16        country_language  CHAR(50)
    17      )
    18    )
    19    LOCATION ('Countries1.txt')
    20  )
    21  PARALLEL 5
    22  REJECT LIMIT UNLIMITED;
    Table created.
    SQL> SELECT * FROM countries_ext;
    COUNT COUNTRY_NAME
    COUNTRY_LANGUAGE
    ENG   England
    English
    SCO   Scotland
    English
    IRE   Ireland
    English
    COUNT COUNTRY_NAME
    COUNTRY_LANGUAGE
    WAL   Wales
    Welsh

  • Error while creating partition table

    Hi frnds i am getting error while i am trying to create a partition table using range
    getting error ORA-00906: missing left parenthesis.I used the following statement to create partition table
    CREATE TABLE SAMPLE_ORDERS
    (ORDER_NUMBER NUMBER,
    ORDER_DATE DATE,
    CUST_NUM NUMBER,
    TOTAL_PRICE NUMBER,
    TOTAL_TAX NUMBER,
    TOTAL_SHIPPING NUMBER)
    PARTITION BY RANGE(ORDER_DATE)
    PARTITION SO99Q1 VALUES LESS THAN TO_DATE(‘01-APR-1999’, ‘DD-MON-YYYY’),
    PARTITION SO99Q2 VALUES LESS THAN TO_DATE(‘01-JUL-1999’, ‘DD-MON-YYYY’),
    PARTITION SO99Q3 VALUES LESS THAN TO_DATE(‘01-OCT-1999’, ‘DD-MON-YYYY’),
    PARTITION SO99Q4 VALUES LESS THAN TO_DATE(‘01-JAN-2000’, ‘DD-MON-YYYY’),
    PARTITION SO00Q1 VALUES LESS THAN TO_DATE(‘01-APR-2000’, ‘DD-MON-YYYY’),
    PARTITION SO00Q2 VALUES LESS THAN TO_DATE(‘01-JUL-2000’, ‘DD-MON-YYYY’),
    PARTITION SO00Q3 VALUES LESS THAN TO_DATE(‘01-OCT-2000’, ‘DD-MON-YYYY’),
    PARTITION SO00Q4 VALUES LESS THAN TO_DATE(‘01-JAN-2001’, ‘DD-MON-YYYY’)
    ;

    More than one of them. Try this instead:
    CREATE TABLE SAMPLE_ORDERS
    (ORDER_NUMBER NUMBER,
    ORDER_DATE DATE,
    CUST_NUM NUMBER,
    TOTAL_PRICE NUMBER,
    TOTAL_TAX NUMBER,
    TOTAL_SHIPPING NUMBER)
    PARTITION BY RANGE(ORDER_DATE) (
    PARTITION SO99Q1 VALUES LESS THAN (TO_DATE('01-APR-1999', 'DD-MON-YYYY')),
    PARTITION SO99Q2 VALUES LESS THAN (TO_DATE('01-JUL-1999', 'DD-MON-YYYY')),
    PARTITION SO99Q3 VALUES LESS THAN (TO_DATE('01-OCT-1999', 'DD-MON-YYYY')),
    PARTITION SO99Q4 VALUES LESS THAN (TO_DATE('01-JAN-2000', 'DD-MON-YYYY')),
    PARTITION SO00Q1 VALUES LESS THAN (TO_DATE('01-APR-2000', 'DD-MON-YYYY')),
    PARTITION SO00Q2 VALUES LESS THAN (TO_DATE('01-JUL-2000', 'DD-MON-YYYY')),
    PARTITION SO00Q3 VALUES LESS THAN (TO_DATE('01-OCT-2000', 'DD-MON-YYYY')),
    PARTITION SO00Q4 VALUES LESS THAN (TO_DATE('01-JAN-2001', 'DD-MON-YYYY')))In the future, if you are having problems, go to Morgan's Library at www.psoug.org.
    Find a working demo, copy it, then modify it for your purposes.

  • Getting error while creating a table

    Hi there,
    I have created a user 'ram' and gave "create table" permissions for that user.
    After that, when I tried to create a table using the command
    create table countries as select * from hr.countries;
    where hr is another user and countries is the name of table in that schemagetting error message
    ERROR at line 1:
    ORA-00942: table or view does not existNOTE: The same error occurs even while creating a table in 'ram' schema after granting sysdba rights to 'ram'
    Thanks
    Rajiv

    Hi,
    dose the user ram has SELECT rights on the table hr.countries. Can he do SELECT in that table.
    Thanks

  • Errors when Creating Aggregate Tables in OBIEE 11.1.1.6 within SQL server

    Hi All,
    I was trying to create an aggregate table in OBIEE 11.1.1.6 within SQL Server. The sql was generated successfully as below. But an error occurred when I use NQCMD to execute the sql and the following error showed:
    1. SQL for creating Aggregate Table:
    create aggregates
    "ag_Measure"
    for "ASOBI_DTT_Demo"."Measure"("ValidVIPCnt")
    at levels ("ASOBI_DTT_Demo"."日期"."月", "ASOBI_DTT_Demo"."門市品牌"."門市品牌", "ASOBI_DTT_Demo"."門市類別"."門市類別", "ASOBI_DTT_Demo"."內創門市"."內創門市", "ASOBI_DTT_Demo"."門市/倉庫"."門市/倉庫", "ASOBI_DTT_Demo"."門市群組"."門市群組", "ASOBI_DTT_Demo"."門市行政區課"."行政區", "ASOBI_DTT_Demo"."門市地區"."城市")
    using connection pool "ASOBI_DTT_Demo"."ASOBI_System10"
    in "ASOBI_DTT_Demo"."ASOBI"."dbo";
    2. Error Message:
    "ag_Measure"
    for "ASOBI_DTT_Demo"."Measure"("ValidVIPCnt")
    at levels ("ASOBI_DTT_Demo"."日期"."月", "ASOBI_DTT_Demo"."門市品牌"."門市品牌"
    , "ASOBI_DTT_Demo"."門市類別"."門市類別", "ASOBI_DTT_Demo"."內創門市"."內創門市"
    , "ASOBI_DTT_Demo"."門市/倉庫"."門市/倉庫", "ASOBI_DTT_Demo"."門市群組"."門市群
    組", "ASOBI_DTT_Demo"."門市行政區課"."行政區", "ASOBI_DTT_Demo"."門市地區"."城市
    using connection pool "ASOBI_DTT_Demo"."ASOBI_System10"
    in "ASOBI_DTT_Demo"."ASOBI"."dbo"
    [343][State: 37000] [Microsoft][SQL Server Native Client 10.0][SQL Server]CREATE
    、DROP or ALTER 陳述式中使用未知的物件類型 'aggregates'。
    Statement execute failed
    Which means "Using unknown object type 'aggregates' in CREATE. DROP or ALTER statements" in English.
    Can anyone give me a suggestion for this error?? Many thanks!!!

    Hi Martin,
    I guess, I was not clear enough. Let me try again
    How Aggregate Persistence works in OBIEE?
    Once you are done choosing options in the Aggregate Persistence wizard, it generates an intelligent Query.
    What query is it?
    If you happen to understand the query, it is not like any ANSI standard SQL (I would say DDL) query. As you might have noticed there are no SQL Server datatypes, lengths, keys, constraints etc. This query can only be understood by the BI Server.
    How do I issue this query?
    Since the logical query could only be understood by BI Server, it has to be issued only to BI Server Engine using some tool viz NQCMD in this case.
    What does issuing this query using NQCMD do?
    The execution steps are as follows, the moment the query is issue via NQCMD
    Aggregate Persistent Wiz Generate Query ----- Issued to ---> NQCMD ----- Passes the logical query to ---> BI Server ----- Parses the query ---> Builds the corresponding physical DDL statements Issued --->To the Database --- If successful ---> .RPD is automatically updated with the aggregated sources etc.
    How do I pass the query to BI Server using NQCMD?
    The format of issuing this logical query to BI Server using NQCMD is
    nqcmd -d <Data Source Name> -u <Analytics UserId> -p <Password> -s <command> > output.log
    where
    <Data Source Name> : Is the DSN name which OBIPS uses to talk to Oracle BI Server. Yes, it's the very same DSN that can be found in InstanceConfig.xml
    <Analytics UserID> : Any user in obiee with admin privileges.
    <Password> : Password of the obiee UserId
    <Command> : Logical SQL Command which you already have handy.
    Hope I was good this time..
    Dhar

  • Error in Creating DWH Tables using DAC

    Hi friends,
    While trying to create DWH tables from Tools>>ETL Mgmt>>Configure.
    At the end of creating DWH tables resulted in failure. When i checked with the log file "createwtables.log" it showed like below
    =====================================
    STD OUTPUT
    =====================================
    CREATING SIEBEL DATABASE OBJECTS
    C:\orahome\10gR3_1\bifoundation\dac\UTILITIES\BIN\DDLIMP /I N /s N /u DAC /p ******* /c OBIDB /G "SSE_ROLE" /f C:\orahome\10gR3_1\bifoundation\dac/conf/sqlgen/ctl-file/oracle_bi_dw.ctl /b OBIEE_TOOLS /K OBIEE_TOOLS /X OBIEE_INDEX /W N
    Error while importing Siebel database schema.
    =====================================
    ERROR OUTPUT
    =====================================
    Siebel Enterprise Applications ODBC DDL Import Utility, Version 7.7 [18030] ENU
    Copyright (c) 2001 Siebel Systems, Inc.  All rights reserved.
    This software is the property of Siebel Systems, Inc., 2207 Bridgepointe Parkway,
    San Mateo, CA 94404.
    User agrees that any use of this software is governed by: (1) the applicable
    user limitations and other terms and conditions of the license agreement which
    has been entered into with Siebel Systems or its authorized distributors; and
    (2) the proprietary and restricted rights notices included in this software.
    WARNING: THIS COMPUTER PROGRAM IS PROTECTED BY U.S. AND INTERNATIONAL LAW.
    UNAUTHORIZED REPRODUCTION, DISTRIBUTION OR USE OF THIS PROGRAM, OR ANY PORTION
    OF IT, MAY RESULT IN SEVERE CIVIL AND CRIMINAL PENALTIES, AND WILL BE
    PROSECUTED TO THE MAXIMUM EXTENT POSSIBLE UNDER THE LAW.
    If you have received this software in error, please notify Siebel Systems
    immediately at (650) 295-5000.
    C:\orahome\10gR3_1\bifoundation\dac\UTILITIES\BIN\DDLIMP /I N /s N /u DAC /p ***** /c OBIDB /G SSE_ROLE /f C:\orahome\10gR3_1\bifoundation\dac/conf/sqlgen/ctl-file/oracle_bi_dw.ctl /b OBIEE_TOOLS /K OBIEE_TOOLS /X OBIEE_INDEX /W N
    Connecting to the database...
    Unable to connect to the database...Im sure that database connectivity to the user in Up. These are the below details that i gave
    TableOwner: BIAPPS
    Pwd: BIAPPS
    ODBC Datasource: OBIDB
    Tablespace: OBIEE_TOOLS
    Indexspace: OBIEE_INDEXAll the above details, are seemed to be correct, but it is resulting in failure. What might be the problem.
    REgards,
    Saro

    Hi Andy,
    Like Svee, adviced in the below link
    https://forums.oracle.com/forums/thread.jspa?messageID=10520360
    I tried to search for my DSN entry in the odbc driver which is in system32 and systemWOW64. Hence i can find the entry in system32, but not in systemWOW64. So i tried to create my same DSN entry in the driver in systemWOW64 and after that i started to created DWH tables and now it is created successfully.
    Thanks
    Regards,
    Saro

  • Error while creating adf table in jdev 11.1.1.2.0

    Hi
    I am getting below error while running the jsf page.
    =======
    <UIXInclude><_setupIncludeContext> Illegal call to setup the context of an include that is already in context
    <UIXInclude><_tearDownIncludeContext> Illegal call to tear down the context of an include that is not in context
    <UIXPageTemplate><tearDownVisitingContext> Tear down of page template context failed due to an unhandled exception.
    java.util.NoSuchElementException
    =======
    In this jsf page I just dragged view object to create a table.
    What could be the reason?
    Thanks

    Hi,
    Did you drop it as ADF table? Can you post the code snippet of your jspx page?
    -Arun

  • Error when creating DataWarehouse Tables

    I am getting an error when trying to create Datawarehouse tables from DAC ETL Management. See log below.
    =====================================
    STD OUTPUT
    =====================================
    CREATING SIEBEL DATABASE OBJECTS
    D:\orahome\10gR3_1\bifoundation\dac\UTILITIES\BIN\DDLIMP /I N /s N /u ******* /p ******* /c "OBIEE DW ETL" /G "SSE_ROLE" /f D:\orahome\10gR3_1\bifoundation\dac/conf/sqlgen/ctl-file/oracle_bi_dw.ctl /b "" /K "" /X "" /Z N
    Creating table W_A_MNTH_H ...
    Error while importing Siebel database schema.
    =====================================
    ERROR OUTPUT
    =====================================
    D:\orahome\10gR3_1\bifoundation\dac\UTILITIES\BIN\DDLIMP /I N /s N /u SVCOBIEEDW /p ***** /c "OBIEE DW ETL" /G SSE_ROLE /f D:\orahome\10gR3_1\bifoundation\dac/conf/sqlgen/ctl-file/oracle_bi_dw.ctl /b /K /X /Z N
    Connecting to the database...
    Connected.
    Reading tables and indexes from DDL file...
    Read 1070 tables and 0 indexes from DDL file...
    Reading existing schema...
    Read 0 tablespaces, 0 tables and 0 indexes from existing schema...
    Running SQL statements against the database...
    S0001: [Microsoft][ODBC SQL Server Driver][SQL Server]There is already an object named 'W_A_MNTH_H' in the database.
    create table W_A_MNTH_H (
    ROW_WID numeric(10, 0) not null default 0,
    BASE_MNTH_WID numeric(10, 0) null,
    PRE_MNTH_WID numeric(10, 0) null,
    YAGO_BASE_WID numeric(10, 0) null,
    YAGO_PRE_WID numeric(10, 0) null,
    PER_NAME_HALF varchar(50) null,
    PER_NAME_MONTH varchar(50) null,
    PER_NAME_QTR varchar(50) null,
    PER_NAME_TER varchar(50) null,
    PER_NAME_YEAR varchar(50) null)
    writeExecDDL error (UTLOdbcExecDirectDDL pDDLSql).
    writeExecDDL error (pOperCallback UTLDbDdlOperTblCreate).
    Error in MainFunction (UTLDbDdlDbMerge).
    Error in Main function...
    Any help would be greatly appreciated!
    Thanks,
    Brent

    I am having same issue... did you get around with it????
    Thanks in advance

  • Error in creating  External Table

    I am following the following procedure to create an external table,but somehow i am not getting success.Can anyone pls explain the error?
    CREATE OR REPLACE DIRECTORY TEST_DIR AS 'C:\TEST'
    Directory created.
    GRANT READ,WRITE ON DIRECTORY TEST_DIR TO PUBLIC
    Grant succeeded.
    CREATE TABLE external_table
    (empno     NUMBER(4),
    ename     VARCHAR2(10),
    job     VARCHAR2(9),
    mgr     NUMBER(4),
    hiredate DATE,
    sal     NUMBER(7, 2),
    comm     NUMBER(7, 2),
    deptno     NUMBER(2))
    ORGANIZATION EXTERNAL
    (TYPE ORACLE_LOADER
    DEFAULT DIRECTORY TEST_DIR
    ACCESS PARAMETERS
    (RECORDS DELIMITED BY NEWLINE
    BADFILE 'TEST_DIR':'emp.bad'
    LOGFILE 'TEST_DIR':'emp.log'
    FIELDS TERMINATED BY ',')
    LOCATION ('emp.csv'))
    Table created.
    The file emp.csv is located in TEST_DIR.
    SELECT * FROM EXTERNAL_TABLE
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04063: unable to open log file emp.log
    OS error The system cannot find the file specified.
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    -MS

    quote from the docs:
    "Note that READ or WRITE permission to a directory object means only that the Oracle database will read or write that file on your behalf. You are not given direct access to those files outside of the Oracle database unless you have the appropriate operating system privileges. Similarly, the Oracle database requires permission from the operating system to read and write files in the directories."
    http://www.di.unipi.it/~ghelli/didattica/bdl/B19306_01/server.102/b14215/et_concepts.htm

  • Error in creating partition table in oracle spatial by ankur

    Hi,
    Am working on Oracle 10.2.0.3
    Am not able to create partition table in Oracle
    i have all the required columns in node and edge table ......the moment i try to create partition table using exec sdo_router_partition.partion_router i get the following error:
    ERROR at line 1:
    ORA-00947: not enough values
    ORA-06512: at "MDSYS.SDO_ROUTER_PARTITION", line 1510
    ORA-06512: at "MDSYS.SDO_ROUTER_PARTITION", line 661
    ORA-06512: at line 1
    Can someone help ??

    hey i have found the solution myself :)

  • Error during Creating Z table

    Dear All,
    I am trying to create Z-Table in se11 with 56 fields.Out of 56 fields, 50 fields are type of String.
    while activating the table system is giving error saying.....
    "Table contains more than 3 long string fields" and if i am giving data type Char and each field length 200 char.
    than error is "Table ZQM12_TEXT is too long (>4030)".
    Please help me.
    Thanks in Advance!!!!!!!!!
    Best Rgds,
    Shiv

    Hello Shiv,
    lets get this straight. the error message you get is that your table is too long (wide). Like it seems 4030 is the maximum amount of characters for a table unless we speak of cluster tables.
    1. So you either can reduce the number of characters of each of your (text/char/string)-fields to fit this condition, or you could reduce the number of fields until you match the condition.
    2. Since you are talking of texts which have to be printed on a smartform, i want to introduce transaction SO10 to you.
    There we can store standard texts in a SAP system. Those texts are easily maintainable on TA SO10 and fulfill everything you need you just dont need to create any new table, and so wont have problems.
    My answer nw is a bit of a general one since i dont really get what your requirement is, if i were better informed i could help the better.
    regards

Maybe you are looking for

  • TS3694 ERROR 1611 WHATS THAT AND HOW DO I SOLVE IT

    im getting error 1611 wen i try to restore my phone

  • Sorting data for export

    I need to use one form (a questionnaire) with various groups.  Will the data for everyone who completes my form always be appended to the same file for export?  Can I export only part of the data (i.e. that for a specific group) instead of all of it

  • Challenge #246

    Folks made some beautiful music with these performers. ALEX B: I like the variety of your images this week -- the fireworks and the foreground crowd in #3 are especially neat. BARBARA W: Very nice black and white version in #1 and a cool 'collage' ef

  • Photo Booth issue

    Video on Photo Booth did not record. Any hope of recovering?

  • Why won't quicktimes and mpegs import into iTunes?

    I'm trying to make a playlist of videos in iTunes. Several of my movies won't import when I drag and drop them. Some were created in Final Cut Pro 7 as basic MOV. One is an MPEG I received frome someone. Why won't they import? thanks Scott