Creating Table - Preserve Case

Hi,
While Creating a table in Apex, we get a option PRESERVE CASE (Check Box). What is the function of This Check Box.
Thanks.
Shijesh

Yes and those references will access the object known to the data dictionary as FOO. But if you create a table "FoO" you have to reference it in double quotes as "FoO" and this object is not the same object as the object named FOO.
Scott

Similar Messages

  • How to create table in Oracle 9i of name USER

    To whom so ever forum member,
    Please help me for creating table in Oracle 9i with the table name USER, though i know that it's reserve word for the Oracle DB
    Please give me the query if any for the same.
    Thanks in advance for timely help.
    Kiran.

    CREATE USER user-name IDENTIFY BY password
    user-name
    The name of the user to be created. The name is an identifier with a maximum of 30 characters. Note that if support for delimited identifiers is on and the user name begins with an underscore, you must place the user name in quotation marks.
    various identifiers possible
    simple-identifier ::= identifier-start { identifier-part }
    identifier-start ::= letter | % | _
    identifier-part ::= letter | number | _ | @ | # | $
    delimited-identifier ::= " delimited-identifier-part { delimited-identifier-part } "
    delimited-identifier-part ::= non-double-quote-character | double-quote-symbol
    double-quote-symbol ::= ""
    An identifier cannot be a SQL reserved word.
    An identifier may be either a simple identifier or a delimited identifier.
    password
    The password of the user to be created.
    the reserved words are:
    %AFTERHAVING | %ALPHAUP | %ALTER | %ALTER_USER | %BEGTRANS |
    %CHECKPRIV | %CREATE_ROLE | %CREATE_USER | %DBUGFULL |
    %DELDATA | %DESCRIPTION | %DROP_ANY_ROLE | %DROP_USER |
    %EXACT | %EXTERNAL | %FILE | %FOREACH | %FULL |
    %GRANT_ANY_PRIVILEGE | %GRANT_ANY_ROLE | %INORDER |
    %INTERNAL | %INTEXT | %INTRANS | %INTRANSACTION | %MCODE |
    %NOCHECK | %NODELDATA | %NOINDEX | %NOLOCK | %NOTRIGGER |
    %NUMROWS | %ODBCOUT | %ROUTINE | %ROWCOUNT | %STARTSWITH |
    %STRING | %THRESHOLD | %UPPER |
    ABSOLUTE | ACTION | ADD | ALL | ALLOCATE | ALTER | AND |
    ANY | ARE | AS | ASC | ASSERTION | AT | AUTHORIZATION | AVG |
    BEGIN | BETWEEN | BIT | BIT_LENGTH | BOTH | BY | CASCADE |
    CASE | CAST | CATALOG | CHAR | CHARACTER | CHARACTER_LENGTH |
    CHAR_LENGTH | CHECK | CLOSE | COALESCE | COBOL | COLLATE |
    COLLATION | COLUMN | COMMIT | CONNECT | CONNECTION |
    CONSTRAINT | CONSTRAINTS | CONTINUE | CONVERT |
    CORRESPONDING | COUNT | CREATE | CROSS | CURRENT |
    CURRENT_DATE | CURRENT_TIME | CURRENT_TIMESTAMP |
    CURRENT_USER | CURSOR | DATE | DAY | DEALLOCATE | DEC |
    DECIMAL | DECLARE | DEFAULT | DEFERRABLE | DEFERRED |
    DELETE | DESC | DESCRIBE | DESCRIPTOR | DIAGNOSTICS |
    DISCONNECT | DISTINCT | DOMAIN | DOUBLE | DROP | ELSE |
    END | ENDEXEC | ESCAPE | EXCEPT | EXCEPTION | EXEC |
    EXECUTE | EXISTS | EXTERNAL | EXTRACT | FALSE | FETCH |
    FILE | FIRST | FLOAT | FOR | FOREIGN | FORTRAN | FOUND |
    FROM | FULL | GET | GLOBAL | GO | GOTO | GRANT | GROUP |
    HAVING | HOUR | IDENTITY | IMMEDIATE | IN | INDICATOR |
    INITIALLY | INNER | INPUT | INSENSITIVE | INSERT | INT |
    INTEGER | INTERSECT | INTERVAL | INTO | IS | ISOLATION |
    JOIN | KEY | LANGUAGE | LAST | LEADING | LEFT | LEVEL |
    LIKE | LOCAL | LOWER | MATCH | MAX | MIN | MINUTE |
    MODULE | MONTH | NAMES | NATIONAL | NATURAL | NCHAR |
    NEXT | NO | NOT | NULL | NULLIF | NUMERIC | OCTET_LENGTH |
    OF | ON | ONLY | OPEN | OPTION | OR | ORDER | OUTER |
    OUTPUT | OVERLAPS | PAD | PARTIAL | PASCAL | PLI |
    POSITION | PRECISION | PREPARE | PRESERVE | PRIMARY |
    PRIOR | PRIVILEGES | PROCEDURE | PUBLIC | READ | REAL |
    REFERENCES | RELATIVE | RESTRICT | REVOKE | RIGHT | ROLE |
    ROLLBACK | ROWS | SCHEMA | SCROLL | SECOND | SECTION |
    SELECT | SESSION_USER | SET | SIZE | SMALLINT | SOME |
    SPACE | SQL | SQLCODE | SQLERROR | SQLSTATE | SUBSTRING |
    SUM | SYSTEM_USER | TABLE | TEMPORARY | THEN | TIME |
    TIMESTAMP | TIMEZONE_HOUR | TIMEZONE_MINUTE | TO |
    TRAILING | TRANSACTION | TRANSLATE | TRANSLATION | TRIM |
    TRUE | UNION | UNIQUE | UNKNOWN | UPDATE | UPPER | USAGE |
    <br>
    USER |
    <br>
    USING | VALUE | VALUES | VARCHAR | VARYING | VIEW |
    WHEN | WHENEVER | WHERE | WITH | WORK | WRITE | YEAR |
    ZONE
    hope it helps ...
    roli

  • When I try to create table Application ,I am getting an error message .

    create table College(cName varchar2(200) NOT NULL PRIMARY KEY,
              state varchar2(20) NOT NULL,
         enrollment int NOT NULL (enrollment > 0);
    create table Student(sID int NOT NULL, sName varchar2(200) NOT NULL,
    GPA real NOT NULL CHECK(gpa >0 AND gpa < 4.0),
              sizeHS int NOT NULL,
              CONSTRAINT Primary_Key_SID PRIMARY KEY (SID));
    create table Application(sID int NOT NULL,
    cName varchar2(200) NOT NULL,
                   major varchar2(20) NOT NULL,
         decision varchar2(10)) NOT NULL CHECK(decision ='y'OR decision = 'n');
                   CONSTRAINT fk_Sid FOREIGN KEY (SID) REFERENCES Student(SID),
                   CONSTRAINT fk_Cname FOREIGN KEY(CNAME) REFERENCES college(CNAME));
    Error starting at line 5 in command:
    CONSTRAINT fk_Sid FOREIGN KEY (SID) REFERENCES Student(SID),
    Error report:
    Unknown Command
    Error starting at line 6 in command:
    CONSTRAINT fk_Cname FOREIGN KEY(CNAME) REFERENCES college(CNAME))
    Error report:
    Unknown Command
    Edited by: 974970 on Dec 4, 2012 12:54 PM

    a couple of side observations ..
    First, it is much easier to read code when it is (1) formatted, and (2) that formatting is preserved in the forum by use of the \ tag.CREATE
    TABLE College
    cName VARCHAR2(200) NOT NULL
    , state VARCHAR2(20) NOT NULL
    , enrollment INT NOT NULL (enrollment > 0);
    CREATE
    TABLE Student
    sID INT NOT NULL
    , sName VARCHAR2(200) NOT NULL
    , GPA REAL NOT NULL CHECK(gpa >0 AND gpa < 4.0)
    , sizeHS INT NOT NULL
    , CONSTRAINT Primary_Key_SID PRIMARY KEY (SID)
    CREATE
    TABLE Application
    sID INT NOT NULL
    , cName VARCHAR2(200) NOT NULL
    , major VARCHAR2(20) NOT NULL
    , decision VARCHAR2(10)
    NOT NULL CHECK
    decision ='y'OR decision = 'n'
    CONSTRAINT fk_Sid FOREIGN KEY (SID) REFERENCES Student(SID),
    CONSTRAINT fk_Cname FOREIGN KEY(CNAME) REFERENCES college(CNAME));
    Now,
    First, drop the mixed case names.  Oracle isn't going to store them in mixed case in the dictionary, and if your force it to do so you just create bigger problems for yourself.  You may have learned mixed case in the MS world, but this is Oracle.  When in Rome
    Second, you have a column named SID  (yes, you entered it as "sID", but to oracle it is SID.  And to oracle, it is a key word.  Find an alternative.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Creating table with null and not null values.

    I have to create a table with 5 Null nd 5 Not Null fields.My questionis which fields are place first?Not or Not Null and why???

    What you mean is: the person who asked you the question thought the order of columns was important, and wanted to see if you agreed. Or maybe they were just asking the question to see whether you thought it was important (as a test of your understanding of the database).
    When I started out in Oracle I was told that it was good practice to have the mandatory columns first and then the optional columns. But if you do some research you find this: the impact of column ordering on space management is: empty nullable columns at the end of the table take up zero bytes whereas empty nullable columns at the middle of the table take up one byte each. I think if that saving really is important to you you need to spring for an additional hard drive.
    Besides, even if you do organise your columns as you suggest, what happens when you add an eleventh NOT NULL column to your table? It gets tacked on to the end of your table. Your whole neat organisation is blown.
    What does still matter is the positioning of large VARCHAR2 columns: they should be the last columns on your table in case they create chaining. Then any query that doesn't need the large columns can be satisfied without reading the chained block, something that can't be guaranteed if you've got columns after a VARCHAR2(4000) column. This doesn't apply to CLOBs, etc. which are stored separately anyway.
    Cheers, APC

  • Any way to stop Pages (current) from creating Table of Contents when converting to ePub. My PDF conversion is perfect  Thanks

    Any way to stop Pages (current) from creating Table of Contents (in this case Chapter 1) when
    coverting from Pages to ePub. This messes up my book.  The PDF file created is perfect!
    Thanks for any help.  Jim

    You might want to search/ask in the forum for Pages too
    https://discussions.apple.com/community/iwork/pages

  • How to create index not unique at the time of the CREATE TABLE

    Hi,
    I am trying to find out how in Oracle create secondary indexes that can accept duplicated into the CREATE TABLE statement, without have to execute a CREATE INDEX separately.
    As far I can see the only syntax accepted by Oracle 9i to create more than one index at the time of the table creation is:
    CREATE TABLE test_tab (x INTEGER, y INTEGER, z INTEGER PRIMARY KEY(x,y), UNIQUE(z))
    But, in my case I need to have the unicity only for the primary key, but not for the second index, that I would like to have not unique.
    How to do that inside of the CREATE TABLE statement?
    Any help?
    Thanks a lot in advance.

    To create an index automatically (not constraint related) , you will need to have an 'event' trigger on the schema that will (IE: detecting a table create/drop matching ARCHIVE_%) , generate the appropriate SQL required (create index sql) and pass THAT to a DBMS_JOB.
    Make sure you have job queue's enabled.
    This was the ONLY way that I could re-create a view automatically as new tables were created that matched a criteria IE ARCHIVE_JAN06, ARCHIVE_FEB06 etc.
    The application's "archiving" method created and was thus aware of these tables and permitted searching within 'archived' data, but 3rd party reporting applications needed to see a view encompassing all data, regardless of the tables involved. The view automatically created was a 'union_all' of all tables concerned.

  • How to enter a data into the specified column and row in a created table

    Hi,
    I want to enter some data to specified column and row in a already created table. Please let me know how to do this.
    Regards
    Shivakumar Singh

    A table is just a 2D array of strings. Keep it in a shift register and use "replace array element" to modify the desired entry programmatically.
    If you want to modify it manually and directly from the front panel, make it into a control and type directly into the desired element. (In this case your program would need to write to it using a local variable).
    Atttached is a simple example in LabVIEW 7.0 that shows both possibilities.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    ChangeTableEntries.vi ‏41 KB

  • Source sys Restore "error while creating table EDISEGMENT "

    Dear All,
    I am Basis person and recently we have refreshed data of Test BI system from Development BI system. we normally carry out these Refresh but In this case we have also changed Hostname and SID for Test BI system.
    We have done all BW refresh steps as per guide and during Restore of source system we
    are getting errors during datasource activation as  " error while creating table EDISEGMENT ".
    we have checked RFC and Partner profiles and working fine.
    We have 2 clients connected from source system to our Test BI box.strange thing is we got one source system activated without any errors and for second
    source system we are getting above mentioned error.
    We have reviewed notes 339957 , 493422 but our BI fuctional team is not sure whether
    those apply to our OLTP system , as one source system from same OLTP system got
    successfully activated and source system for other client giving this issue .
    Please help us out with this problem.
    we are running on BI 7.0 platform and ECC 6.0 for source.
    Regards,
    Rr

    check the relevant profiles in We20 t code and also in sm59 if the remote connection with autorisation is sucssessfull, connection is ok otherwise you need to check th paramters.
    hope this helps
    regards
    santosh

  • Create table more than 1000 colum

    Hello
    I have 1500+ column in my select query. how to create table like my query is
    create table xyz nologging as
    select a1,a2,a3,a4,a5,b1,b2,b3,b4,b5,................a1500
    from abcd a,bcde b
    where a.a1=b.b1
    In oracle 10g I can create only 1000 column in a table.
    Please suggest

    799301 wrote:
    My all columns are formulated with different different tables and want to create one intermediate table
    below query is just example
    select count(unique((case when sysdate >45 then video=Y and audio=N then 1 else 0 end))) vd_45,
    count(unique((case when sysdate >105 then video=Y and audio=N then 1 else 0 end))) vd_105,
    count(unique((case when sysdate >195 then video=Y and audio=N then 1 else 0 end))) vd_195,
    count(unique((case when sysdate >380 then video=Y and audio=N then 1 else 0 end))) vd_380,
    count(unique((case when sysdate >45 then video=N and audio=Y then 1 else 0 end))) ad_45,
    count(unique((case when sysdate >105 then video=N and audio=Y then 1 else 0 end))) ad_105,
    count(unique((case when sysdate >195 then video=N and audio=Y then 1 else 0 end))) ad_195,
    count(unique((case when sysdate >380 then video=N and audio=Y then 1 else 0 end))) ad_380
    from abcd a,bcde b
    where a.a1=b.b1;
    please suggest how create more than 1000 table columnBy creating a proper relation between the "formulated function" and stored value.
    Simplistically put:
    Do you model invoices as entities INVOICES_2010, INVOICES_2011 and so on?
    Or do you model it as INVOICES that has a year (date) attribute?
    It does not make sense to put attribute data into the name of entity. Nor does it make sense to put relationship data into the name of an attribute and create a 1000+ attributes as a result.

  • SQL Developer 1.5.1 - warning messages generated by CREATE TABLE

    Hi,
    Have an issue with a CREATE TABLE statement - it works correctly, but generates a warning message when used in SQL Developer (1.2 or 1.5.1). Full test case below:
    Setup:
    drop table samplenames;
    drop table customers;
    drop table phones;
    drop table customers_phone;
    drop sequence primkey;
    create table samplenames
    (name VARCHAR2(10));
    insert into samplenames values ('dan');
    insert into samplenames values ('joe');
    insert into samplenames values ('bob');
    insert into samplenames values ('sam');
    insert into samplenames values ('weslington');
    insert into samplenames values ('sue');
    insert into samplenames values ('ann');
    insert into samplenames values ('mary');
    insert into samplenames values ('pam');
    insert into samplenames values ('lucy');
    create sequence primkey
    start with 1000000
    increment by 1;
    create table customers as
    select primkey.nextval as cust_id,
    tmp1.name || tmp2.name as first_name,
    tmp3.name || tmp4.name || tmp5.name as last_name
    from samplenames tmp1,
    samplenames tmp2,
    samplenames tmp3,
    samplenames tmp4,
    samplenames tmp5;
    CREATE TABLE PHONES AS
    SELECT cust_id, 'H' as phn_loc, trunc(dbms_random.value(100,999)) as area_cde,
    trunc(dbms_random.value(1000000,9999999)) as phn_num
    FROM customers;
    INSERT INTO PHONES
    SELECT cust_id, 'B' as phn_loc, trunc(dbms_random.value(100,999)) as area_cde,
    trunc(dbms_random.value(1000000,9999999)) as phn_num
    FROM customers;
    --randomly delete ~10% of records to make sure nulls are handled correctly.
    delete from phones
    where MOD(area_cde + phn_num, 10) = 0;
    create table statement (there are legacy reasons for why this is written the way it is):
    CREATE TABLE customers_phone NOLOGGING AS
    SELECT cst.*,
    piv.HOME_PHONE,
    piv.WORK_PHONE
    FROM (SELECT cust_id,
    MAX(decode(phn_loc, 'H', '(' || area_cde || ') ' ||
    substr(phn_num,1,3) || '-' || substr(phn_num,4,4), NULL)) AS HOME_PHONE,
    MAX(decode(phn_loc, 'B', '(' || area_cde || ') ' ||
    substr(phn_num,1,3) || '-' || substr(phn_num,4,4), NULL)) AS WORK_PHONE
    FROM phones phn
    WHERE phn_loc IN ('H', 'B')
    AND cust_id IS NOT NULL
    AND EXISTS (SELECT NULL
    FROM customers
    WHERE cust_id = phn.cust_id)
    GROUP BY cust_id) piv,
    customers cst
    WHERE cst.cust_id = piv.cust_id (+)
    Warning message output:
    "Error starting at line 1 in command:
    CREATE TABLE customers_phone NOLOGGING AS
    SELECT cst.*,
    piv.HOME_PHONE,
    piv.WORK_PHONE
    FROM (SELECT cust_id,
    MAX(decode(phn_loc, 'H', '(' || area_cde || ') ' || substr(phn_num,1,3) || '-' || substr(phn_num,4,4), NULL)) AS HOME_PHONE,
    MAX(decode(phn_loc, 'B', '(' || area_cde || ') ' || substr(phn_num,1,3) || '-' || substr(phn_num,4,4), NULL)) AS WORK_PHONE
    FROM phones phn
    WHERE phn_loc IN ('H', 'B')
    AND cust_id IS NOT NULL
    AND EXISTS (SELECT NULL
    FROM customers
    WHERE cust_id = phn.cust_id)
    GROUP BY cust_id) piv,
    customers cst
    WHERE cst.cust_id = piv.cust_id (+)
    Error report:
    SQL Command: CREATE TABLE
    Failed: Warning: execution completed with warning"
    I am on 10.2.0.3. The CREATE TABLE always completes successfully, but the warning bugs me, and I have had no success tracking it down since there is no associated numberr.
    Anyone have any ideas?

    Hi ,
    The Oracle JDBC driver is returning this warning so I will be logging an issue with them, but for the moment SQL Developer will continue to report the warning as is.
    The reason for the warning is not clear or documented as far as I can tell,
    but I have replicated the issue with a simpler testcase which makes it easier to have a guess about the issue :)
    ----START
    DROP TABLE sourcetable ;
    CREATE TABLE sourcetable(col1 char);
    INSERT INTO sourcetable VALUES('M');
    DROP TABLE customers_phone;
    CREATE TABLE customers_phone AS
    SELECT MAX(decode(col1, 'm','OK' , NULL)) COLALIAS
    FROM sourcetable;
    ----END
    The warning occurs in the above script in SQL Developer , but not in SQL*Plus.
    The warning disappears when we change 'm' to 'M'.
    The warning disappears when we change NULL to 'OK2'
    In all cases the table creates successfully and the appropriate values inserted.
    My gut feeling is ...
    During the definition of customers_phone, Oracle has to work out what the COLALIAS datatype is.
    When it sees NULL as the only alternative (as sourcetable.col1 = 'M' not 'm') it throws up a warning. It then has to rely on the 'OK' value to define the COLALIAS datatype, even though the 'OK' value wont be inserted as sourcetable.col1 = 'M' and not 'm'. So Oracle makes the correct decision to define the COLALIAS as VARCHAR2(2), but the warning is just to say it had to use the alternative value to define the column.
    Why SQL*Plus does not report it and JDBC does, I'm not sure. Either way it doesn't look like a real issue.
    Again, this is just a guess and not a fact.
    Just though an update was in order.
    Regards,
    Dermot.

  • Create Table using DBMS_SQL package and size not exceeding 64K

    I have a size contraint that my SQL size should not exceed 64K.
    Now I would appriciate if some one could tell me how to create a table using
    Dynamic sql along with usage of DBMS_SQL package.
    Brief Scenario: Users at my site are not given permission to create table.
    I need to write a procedure which the users could use to create a table .ALso my SQL size should not exceed 64K. Once this Procedure is created using DBMS_SQL package ,user should pass the table name to create a table.
    Thanks/

    "If a user doesn't have permission to create a table then how do you expect they will be able to do this"
    Well, it depends on what you want to do. I could write a stored proc that creates a table in my schema and give some other user execute privilege on it. They would then be able to create a able in my schema without any explicitly granted create table privilege.
    Similarly, assuming I have CREATE ANY TABLE granted directly to me, I could write a stroe proc that would create a table in another users schema. As long as they have quota on their default tablespace, they do not need CREATE TABLE privileges.
    SQL> CREATE USER a IDENTIFIED BY a
      2  DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp;
    User created.
    SQL> GRANT CREATE SESSION TO a;
    Grant succeeded.
    SQL> CREATE TABLE a.t (id NUMBER, descr VARCHAR2(10));
    CREATE TABLE a.t (id NUMBER, descr VARCHAR2(10))
    ERROR at line 1:
    ORA-01950: no privileges on tablespace 'USERS'So, give them quota on the tablespace and try again
    SQL> ALTER USER a QUOTA UNLIMITED ON users;
    User altered.
    SQL> CREATE TABLE a.t (id NUMBER, descr VARCHAR2(10));
    Table created.Now lets see if it really belongs to a:
    SQL> connect a/a
    Connected.
    SQL> SELECT table_name FROM user_tables;
    TABLE_NAME
    T
    SQL> INSERT INTO t VALUES (1, 'One');
    1 row created.Yes, it definitely belongs to a. Just to show that ther is nothing up my sleeve:
    SQL> create table t1 (id NUMBER, descr VARCHAR2(10));
    create table t1 (id NUMBER, descr VARCHAR2(10))
    ERROR at line 1:
    ORA-01031: insufficient privilegesI can almost, but not quite, see a rationale for the second case if you want to enforce some sort of naming or location standards but the whole thing seems odd to me.
    Users cannot create tables, so lets give them a procedure to create tables?
    John

  • Create a BPEM Case and link to a ISU Contact Record

    Hi All -
    I have a question, We would like to create a FOP to do the following
    1. Create a BPEM case.
    2. Create a ISU Contact for the BP using the method ISUCONTACT-CREATEFROMDATA
    The question is can this method be used to attach the BPEM Case to the Contact Object? That is, will it establish a relationship in the BCONT_OBJ table?
    I want to  look up the BPEM case from the Contact.
    Regards,
    Pradhip.S

    You can definitely do that by adding the business object EMMACASE and object key to be your BPEM case number into the CONTACTOBJECTS/CONTACTOBJECTS_WITH_ROLE parameter of the method you are using.

  • Insert, select and create table as give different results

    Hi all
    I have a strange situation with this three cases:
    1) select statement: SELECT (...)
    2) insert statement with that same select as above: INSERT INTO SELECT (...)
    3) create table statement again with that same select: CREATE TABLE AS SELECT (...)
    Each of these cases produce different number of rows (first one 24, second 108 and third 58). What's more the data for second and third case doesn't have any sense with what they should return. The first case returns good results.
    One interesting thing is that select uses "UNION ALL" between 2 queries. When simple UNION is used, everything works fine and all three cases return 24 rows. Also if each query is run seaprately, they work fine.
    Anyone encountered something like this? (before i create an SR :)
    Database is 10.2.0.2 on AIX 5.3. It's a data warehouse.
    Edited by: dsmoljanovic on Dec 10, 2008 3:57 PM

    I understand UNION vs UNION ALL. But that doesn't change the fact that same SELECT should return same set of rows wether in INSERT, CREATE TABLE AS or a simple SELECT.
    DB version is 10.2.0.2.
    Here is the SQL:
    INSERT INTO TMP_TRADING_PROM_BM_OSTALO
    select
    5 AS VRSTA_PLANIRANJA_KLJUC, u1.UNOS_KLJUC, t1.TRADING_TIP_KLJUC, i1.IZVOR_KLJUC, m1.ITEMNAME AS MJESEC,
    l1.PLAN AS IZNOS, l1.TEKUA AS TEKUCA, l1.PROLA AS PROSLA, l1.PLANTEKUA_ AS IZNOS_TEKUCA, l1.PLANPROLA_ AS IZNOS_PROSLA, l1.TEKUAPROLA_ AS TEKUCA_PROSLA, l1.DATUM_UCITAVANJA
    from
    HR_SP_PLAN.L_12_ET_PROMETI_I_BRUTO_MARZA l1,
    select
    m1.ITEMIID, m1.ITEMNAME
    from
    HR_SP_PLAN.L_12_IT_4_MJESECI m1
    where
    UPPER (m1.ITEMNAME) NOT LIKE '%KVARTAL%' AND UPPER (m1.ITEMNAME) NOT LIKE '%GODINA%' AND UPPER (m1.ITEMNAME) NOT LIKE '%PROC%' and
    m1.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy')
    union all
    select -99, null from dual
    ) m1,
    HR_SP_PLAN.L_12_IT_5_SEKTORI l2,
    HR_SP_PLAN.L_12_IT_2_TIPOVI_OSTALO l3, HR_SP_PLAN.D_UNOS u1, HR_SP_PLAN.D_TRADING_TIP t1, HR_SP_PLAN.L_12_IT_1_PROMET_I_BM_OSTALO p1, HR_SP_PLAN.D_IZVOR i1
    where
    l1.ELIST = l2.ITEMIID and
    l2.ITEMNAME = u1.UNOS_NAZIV and u1.USER_KLJUC = 12 and l2.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy') and
    l1.DIMENSION_1_PROMET = p1.ITEMIID and
    p1.ITEMNAME = i1.IZVOR_NAZIV and i1.USER_KLJUC = 12 and p1.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy') and
    nvl(l1.DIMENSION_4_MJESEC , -99) = m1.ITEMIID and
    l1.DIMENSION_2_TIPOVI = l3.ITEMIID and
    l3.ITEMNAME = t1.TRADING_TIP_NAZIV and l3.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy') and
    l1.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy') and
    'PROC' = 'PLAN'
    union all
    select
    4 AS VRSTA_PLANIRANJA_KLJUC, u1.UNOS_KLJUC, t1.TRADING_TIP_KLJUC, i1.IZVOR_KLJUC, m1.ITEMNAME AS MJESEC,
    l1.PROCJENA AS IZNOS, l1.TEKUA AS TEKUCA, l1.PROLA AS PROSLA, l1.PROCJENATEKUA_ AS IZNOS_TEKUCA, l1.PROCJENAPROLA_ AS IZNOS_PROSLA, l1.TEKUAPROLA_ AS TEKUCA_PROSLA, l1.DATUM_UCITAVANJA
    from
    HR_SP_PLAN.L_13_ET_PROMETI_I_BRUTO_MARZA l1,
    select
    m1.ITEMIID, m1.ITEMNAME
    from
    HR_SP_PLAN.L_13_IT_4_MJESECI m1
    where
    UPPER (m1.ITEMNAME) NOT LIKE '%KVARTAL%' AND UPPER (m1.ITEMNAME) NOT LIKE '%GODINA%' AND UPPER (m1.ITEMNAME) NOT LIKE '%PROC%' and
    nvl(ceil(to_number(m1.ITEMNAME)/3), mod(4, 5)) = mod(4, 5) and m1.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy')
    union all
    select -99, null from dual
    ) m1,
    HR_SP_PLAN.L_13_IT_5_SEKTORI l2, HR_SP_PLAN.L_13_IT_2_TIPOVI_OSTALO l3,
    HR_SP_PLAN.D_UNOS u1, HR_SP_PLAN.D_TRADING_TIP t1,
    HR_SP_PLAN.L_13_IT_1_PROMET_I_BM_OSTALO p1, HR_SP_PLAN.D_IZVOR i1
    where
    l1.ELIST = l2.ITEMIID and
    l2.ITEMNAME = u1.UNOS_NAZIV and u1.USER_KLJUC = 13 and l2.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy') and
    l1.DIMENSION_1_PROMET = p1.ITEMIID and
    p1.ITEMNAME = i1.IZVOR_NAZIV and i1.USER_KLJUC = 13 and p1.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy') and
    nvl(l1.DIMENSION_4_MJESEC , -99) = m1.ITEMIID and
    l1.DIMENSION_2_TIPOVI = l3.ITEMIID and
    l3.ITEMNAME = t1.TRADING_TIP_NAZIV and l3.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy') and
    l1.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy') and
    'PROC' = 'PROC';

  • Generating Create Table As Statements

    Hi all - just after a bit of guidance on the following procedure:
    I have identified various columns that need their numeric values upgrading during a cutover. These are stored in the table FOR_UPGRADE which contains the columns TABLE_NAME, COLUMN_NAME, and FACTOR, (the factor is assigned depending on the object type being upgraded and is used in the calculation to create the new 'upgraded' value for that column).
    My problem is that I'm dealing with very large volumes, (TBs) of data and speed is a key factor here. As such I've been asked to upgrade these using create table statements rather than updates, (I believe this was down to being able to turn almost all the logging off during creates, but not updates). So the plan would be to use CTAS a select from the existing table, but apply the upgrades based on the factor during this, then rename these upgraded tables to match the original.
    Now I'd rather not manually create 200+ of these create table statements so I was hoping someone could advise as to how I could use a combination of FOR_UPGRADE table and ALL_TABLE_COLS to dynamically output all the statements required.
    Any help greatly appreciated.

    Write one script manually and use it as a template to create other scripts.
    The easiest way would be loop through FOR_UPGRADE table
    - as soon as the table name changes you know that next statement starts and previous end so you should do something different than for all other rows.
    - for each column generate its part of insert statement and oputput for example using dbms_output.
    Question remains would you really need user/all_tab_columns view because as I've understood you have already all column names in FOR_UPGRADE table.
    In case you need it (for example to check data type or whatever) you can simply join it to your base cursor.
    With one template already created and a bit of PL/SQL it should not be that hard :)
    Gints Plivna
    http://www.gplivna.eu

  • Create table as select statement.

    Hello Oracle Gurus,
    I am trying to create a table using select * from other table.
    The procedure that I am following is this:-
    I have a temp table whose signature is on commit delete rows.
    I insert records in this table.
    when I do select * from temp_table,perm_table I get some rows.
    then I try to create a result_table using this
    CREATE TABLE result_table
    AS SELECT * FROM temp_table,perm_table;
    I see the table in created but number of records in 0. Can anyone please explain where commit takes place while sequence in this query occurs.
    Thanks
    Edited by: user10696492 on Nov 10, 2009 8:47 AM

    Create table statement is a ddl - so an implicit commit is performed before the create statement begins. The implicit commit will delete all the rows from the temp table. If it is feasible change the definition of the temp table to on commit preserve rows.

Maybe you are looking for

  • Apache http components: logging in to site using forms

    hello, i am attempting to log in to eoddata.com using the apache http component library and by using their example code ClientFormLogin.java Please find my code below. Any help would be greatly appreciated! package myApacheTrial; ====================

  • Bridge CS6 crashes on opening

    Bridge CS6 keeps on crashing on opening. It says "Building criteria" then shows me the rainbow disk, forever and ever until I have to force quit. I have deleted the cache folder in the User/library/adobe/Bridge/Caches and also the files ending in .pl

  • Error when calling RFC

    When i try to call RFC in web dynpro it gives The initial exception that caused the request to fail, was:    java.lang.NullPointerException ................................. Please guide me as i am new in dynpro field.

  • Problem doing Applet exercise

    In my (swedish) course literature I am currently supposed to write an Applet that follows the actions of the window when it is resized . The point is to learn ComponentListener and making it runnable to avoid flickering. the applet is supposed to loo

  • HT201412 Phone suddenly has voice speaking commands but commands do't work

    I've had my iPhone for almost 2 years.  This morning when I tried to use my phone A computerized voice started speaking the commands but the commands don't work.  I didn't even know there was a voice function on this phone.  I can't seem to do anythi