Pro*C unconsistency handling create table

Hi,
I'm using Pro*C to connect to database and to execute a series of creating table commands from a C++ program on a Sun Solaris. Sometime the tables are created and sometime they are not, some other times only some of the tables are created. I suspect that it has someting to do with threading in Oracle. I would appreciate any information in light of this behavior. There are no errors concerning space, tablespace, redo_log...or any issue with performance that I can see of.
Thanks
Gina Nguyen

Have you given the EXEC SQL WHENEVER SQLERROR clause to trap errors (or are you checking the
sqlca.sqlcode variable to see for errors after each SQL statement)?
Check to make sure that you do not have EXEC SQL WHENEVER SQLERROR CONTINUE clause somewhere in
your program.

Similar Messages

  • In creating a fillable PDF in XI Pro, can I insert a table which can be tabbed through?

    In creating a fillable PDF in XI Pro, can I insert a table which can be tabbed through?

    You're in luck. Create the first field and then right-click it (in Form Edit mode) and select Create Multiple Copies. You'll be able to specify how many copies of the fields to generate, and at what intervals. The nice thing is that although the properties of the new fields will be identical to the source one, they'll each have a unique name, so you'll get an instant "table" of fields.

  • Parameter into a CREATE TABLE with PRO*C

    Hi,
    I use PRO*C and i've a problem with a CREATE TABLE request.
    My program asks for the name of my variable mission, quite simply that I get with a scanf.
    So, I want to create a table where one of the fields of the table must be the same that the char of the name of the mission. But, the function doesn't do anything… But when i write the name of the variable there is no problem.
    Thanks for your answers and sorry for my english.
    Code :
         void creer_table1(char nom_mission[50])
    EXEC SQL BEGIN DECLARE SECTION;
    VARCHAR TABLE[50];
    EXEC SQL END DECLARE SECTION;
    strcpy(TABLE.arr,nom_mission);
    TABLE.len =strlen(TABLE.arr);
    EXEC SQL CREATE TABLE mission.msn_test AS
    SELECT * FROM mission.msn_mission
    WHERE missionname=:TABLE;
    printf("Table MSN_TEST creee dans le schema MISSION\n");
    PS: My IDE is code::blocks
    Bonjour à tous,
    J'utilise Pro*C et j'ai un problème avec une requête CREATE TABLE. Je m'explique:
    Mon programme demande quel est le nom de ma variable mission, que je récupère tout bêtement avec un scanf.
    Je veux alors créer une table où un de mes champs doit avoir comme valeur le char qui est le nom de la mission. Mais voila, la fonction qui doit créer la table ne la crée pas... Alors que quand je rentre cette variable en dur, cela fonctionne très bien. J'aimerais avoir un petit coup de pouce de votre part si c'est possible. Si ça se trouve j'essaie de faire quelque chose pas forcément possible.
    Voila mon code de la fonction servant à lire la table:
    Voila le code servant créer la fonction:
    Code :
    void creer_table1(char nom_mission[50])
    EXEC SQL BEGIN DECLARE SECTION;
    VARCHAR TABLE[50];
    EXEC SQL END DECLARE SECTION;
    strcpy(TABLE.arr,nom_mission);
    TABLE.len =strlen(TABLE.arr);
    EXEC SQL CREATE TABLE mission.msn_test AS
    SELECT * FROM mission.msn_mission
    WHERE missionname=:TABLE;
    printf("Table MSN_TEST creee dans le schema MISSION\n");
    Merci d'avance pour votre aide.
    PS:Je travaille sous code blocks et avec oracle
    Laurent Barale
    Edited by: 899981 on 30 nov. 2011 08:16

    Hi,
    I hadn't got errors.
    Bit, i solved my problem using dynamic sql.
    exemple:
    void function(char name[50]){
    EXEC SQL BEGIN DECLARE SECTION;
    char *varsql;
    EXEC SQL END DECLARE SECTION;
    char toto[150]="CREATE TABLE test AS SELECT * FROM tutu WHERE employe='";
    varsql=strcat(toto,name);
    strcat(varsql,"'");
    EXEC SQL EXECUTE IMMEDIATE :varsql;
    I hope that could help somebody.
    Bye and thank you for your answer.
    Edited by: 899981 on 20 déc. 2011 05:28

  • 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.

  • Error Handling in table control for line item.

    Hi,
    Please how to do error handling in table control for line item in bdc,i have used format_message for header but i don't no fill decamps internal tabled and  how to do background processing in call transaction.
    Thanks

    Background processing is not possible using call transaction method.
    You can create an executable program which can have CALL TRANSACTION BDC code. And this can be run in background.
    What do you exactly mean by Error handling for Items in table control. Can you give some more details.

  • Hi All, How we can handle a table control in bdc - in detail its urgent pls

    Hi All, How we can handle a table control in bdc - in detail its urgent. Please send me the explanation in detail.
    Thanks&regards.
    Bharat

    hi,
    Create Table Control
    • Step 1 (Create new structure for table control)
    Type is name of structure (ZTC_EKKO) and press create
    • Step 2 (Create Program)
    Goto transaction SE80(Object Navigator) -> Repository Browser -> Program.
    Enter your program name, please ensure that is begins with SAPMZ…… as this is a module pool (dialog program).
    Press enter to create, and press yes!
    Ensure that you create a top include, and press Enter.
    Accept the name created for the top include.
    Press Enter.
    Press Save
    • Step 3 (Create TOP include)
    Double click on the top include and enter following ABAP code:
    Tables: ZTC_EKKO.
    controls: tc100 type tableview using screen 100.
    data: ok_code type sy-ucomm.
    data: it_ekko type standard
    table of ZTC_EKKO initial size 0,
    wa_ekko type ZTC_EKKO.
    data: ok_code type sy-ucomm.
    Press Save and Activate
    • Step 4 (Create screen)
    Right click the program to create a screen 100 for the dialog. Enter Short description, set screen type to Normal and enter 0 or blank into Next screen. Then move to Element List tab and enter the OK code as OK_CODE (i.e. the same as what you declared in the top include with data: ok_code type sy-ucomm).
    • Step 5 (Create table control)
    Press the Layout button to bring up the screen painter editor.
    Press table control button and drag it on to the screen, enter the name of table control created in TOP include (TC100). Now press the yellow button for attributes and set the table control as below options
    • Step 6 (Populate table control )
    Press the orange button (Fields). On the next screen enter ZTC_EKKO and press the ‘Get from Dict’ button. Select the fields you want (all) and press enter. Now drag them onto your Table Control.
    Below is the result, there will been syntax errors if we check now! So Save and go back into the flow logic tab.
    • Step 7 (Create flow control )
    Within the flow logic of screen 100 and create two modules, one to select the data from the database and the other to move the selected fields into the table control. Also insert the two loop statements to populate and retrieve the lines of the table control.
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    module data_retrieval.
    loop at it_ekko into wa_ekko with control TC100.
    module populate_screen.
    endloop.
    PROCESS AFTER INPUT.
    loop at it_ekko.
    endloop.
    MODULE USER_COMMAND_0100.
    Double click the module data_retrieval to create and click yes to get past the popup. Ensure that a new include is created to hold all the PBO modules (default). Press enter.
    Select 10 rows of data from the EKKO table and load into the internal table it_ekko. Go back to the flow logic to load this data into the Table Control.
    check this one
    REPORT ZCALL_TRANS_TAB1 .
    TABLES: LFA1,LFBK,lfb1.
    data: BEGIN OF it_vendor occurs 0,
    LIFNR LIKE LFA1-LIFNR,
    bukrs like lfb1-bukrs,
    END OF it_vendor.
    DATA: BEGIN OF IT_BANK occurs 0,
    LIFNR LIKE LFA1-LIFNR,
    BANKS LIKE LFBK-BANKS,
    BANKL LIKE LFBK-BANKL,
    BANKN LIKE LFBK-BANKN,
    koinh like lfbk-koinh,
    END OF IT_BANK.
    data: it_bdcdata like bdcdata occurs 0 with header line.
    data: it_messages like bdcmsgcoll occurs 0 with header line.
    *selection screen.
    selection-screen: begin of block b1 with frame.
    parameters: p_file like rlgrap-filename default 'c:/vendor.txt'
    obligatory.
    parameters: p_file1 like rlgrap-filename default 'c:/xyz.txt'
    obligatory.
    selection-screen: end of block b1.
    *at selection screen.
    at selection-screen on value-request for p_file.
    perform f4_help using p_file.
    at selection-screen on value-request for p_file1.
    perform f4_help1 using p_file1.
    *start of selection
    start-of-selection.
    *******uploading file
    perform upload_file using p_file P_FILE1.
    ******open session.
    perform populate_data.
    *& Form f4_help
    form f4_help using p_p_file.
    data: l_file type ibipparms-path.
    call function 'F4_FILENAME'
    importing
    file_name = l_file.
    p_file = l_file.
    endform. " f4_help
    *& Form POPULATE_DATA
    form populate_data .
    DATA: L_STRING TYPE STRing.
    DATA: L_COUNTER(2) TYPE n.
    loop at it_vendor.
    perform bdc_dynpro using 'SAPMF02K' '0106'.
    perform bdc_field using 'BDC_CURSOR'
    'RF02K-D0130'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'RF02K-LIFNR'
    it_vendor-lifnr.
    perform bdc_field using 'RF02K-BUKRS'
    it_vendor-bukrs.
    perform bdc_field using 'RF02K-D0130'
    'X'.
    perform bdc_dynpro using 'SAPMF02K' '0130'.
    perform bdc_field using 'BDC_CURSOR'
    'LFBK-bankn(03)'.
    perform bdc_field using 'BDC_OKCODE'
    '=UPDA'.
    *********bank details
    CLEAR l_COUNTER.
    LOOP AT IT_BANK WHERE LIFNR = IT_VENDOR-LIFNR.
    l_COUNTER = l_COUNTER + 1.
    clear l_string.
    CONCATENATE 'lfbk-banks(' l_counter ')' into l_string.
    perform bdc_field using l_string
    it_bank-banks.
    clear l_string.
    CONCATENATE 'lfbk-bankl(' l_counter ')' into l_string.
    perform bdc_field using l_string
    it_bank-bankl.
    clear l_string.
    CONCATENATE 'lfbk-bankn(' l_counter ')' into l_string.
    perform bdc_field using l_string
    it_bank-bankn.
    endloop.
    ******CALL TRANSACTION.
    call transaction 'FK02' using it_bdcdata mode 'A'
    messages into it_messages.
    write:/ sy-subrc.
    perform format_messages.
    clear it_bdcdata.
    refresh it_bdcdata.
    endloop.
    endform. " POPULATE_DATA
    *& Form FORMAT_MESSAGES
    form format_messages .
    data: l_msg(100).
    loop at it_messages.
    call function 'FORMAT_MESSAGE'
    exporting
    id = it_messages-msgid
    lang = sy-langu
    no = it_messages-msgnr
    v1 = it_messages-msgv1
    v2 = it_messages-msgv2
    v3 = it_messages-msgv3
    v4 = it_messages-msgv4
    importing
    msg = l_msg
    exceptions
    not_found = 1
    others = 2
    write:/ l_msg.
    endloop.
    endform. " FORMAT_MESSAGES
    *& Form bdc_dynpro
    form bdc_dynpro using value(p_program)
    value(p_screen).
    it_bdcdata-program = p_program.
    it_bdcdata-dynpro = p_screen.
    it_bdcdata-dynbegin = 'X'.
    append it_bdcdata.
    clear it_bdcdata.
    endform. " bdc_dynpro
    *& Form bdc_field
    form bdc_field using value(p_fnam)
    value(p_fval).
    it_bdcdata-fnam = p_fnam.
    it_bdcdata-fval = p_fval.
    append it_bdcdata.
    clear it_bdcdata.
    endform. " bdc_field
    *& Form upload_file
    form upload_file using p_p_file
    p_p_file1.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    CODEPAGE = ' '
    FILENAME = P_P_FILE
    FILETYPE = 'DAT'
    HEADLEN = ' '
    LINE_EXIT = ' '
    TRUNCLEN = ' '
    USER_FORM = ' '
    USER_PROG = ' '
    DAT_D_FORMAT = ' '
    IMPORTING
    FILELENGTH =
    TABLES
    data_tab = IT_VENDOR
    EXCEPTIONS
    CONVERSION_ERROR = 1
    FILE_OPEN_ERROR = 2
    FILE_READ_ERROR = 3
    INVALID_TYPE = 4
    NO_BATCH = 5
    UNKNOWN_ERROR = 6
    INVALID_TABLE_WIDTH = 7
    GUI_REFUSE_FILETRANSFER = 8
    CUSTOMER_ERROR = 9
    NO_AUTHORITY = 10
    OTHERS = 11
    IF sy-subrc <> 0.
    MESSAGE I000(ZZ) WITH 'UNABLE TO UPLOAD'.
    STOP.
    ENDIF.
    *******UPLOADING BANK DETAILS
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    CODEPAGE = ' '
    FILENAME = P_P_FILE1
    FILETYPE = 'DAT'
    HEADLEN = ' '
    LINE_EXIT = ' '
    TRUNCLEN = ' '
    USER_FORM = ' '
    USER_PROG = ' '
    DAT_D_FORMAT = ' '
    IMPORTING
    FILELENGTH =
    TABLES
    data_tab = IT_BANK
    EXCEPTIONS
    CONVERSION_ERROR = 1
    FILE_OPEN_ERROR = 2
    FILE_READ_ERROR = 3
    INVALID_TYPE = 4
    NO_BATCH = 5
    UNKNOWN_ERROR = 6
    INVALID_TABLE_WIDTH = 7
    GUI_REFUSE_FILETRANSFER = 8
    CUSTOMER_ERROR = 9
    NO_AUTHORITY = 10
    OTHERS = 11
    IF sy-subrc <> 0.
    MESSAGE I000(ZZ) WITH 'UNABLE TO UPLOAD'.
    STOP.
    ENDIF.
    endform. " upload_file
    *& Form f4_help1
    -->P_P_FILE1 text
    form f4_help1 using p_p_file1.
    data:l_file1 type ibipparms-path.
    CALL FUNCTION 'F4_FILENAME'
    IMPORTING
    FILE_NAME = l_file1.
    p_file1 = l_file1.
    endform. " f4_help1
    http://sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    Regards,
    Sankar

  • Automating the installation process,creating the database, creating tables etc at the

    Hi,
    We have a requirement to install oracle 8.1.6 on solaris box. The whole installtion process should be automated. This process includes changing the kernel parameters, creating the oracle account as per the installation guide, configuring the logical volumes, creating the database as per OFA recommendations, creating tables etc. How can i do this with out any interaction from user. Can the Oracle software packager handle all these. Please Let me know ASAP.
    Thanks a bunch.

    Agata,
    The full retail should be white with a snow leopard on it but if you ordered from the on-line store you should be fine.  If it is having problems booting while holding the C key, try restarting the computer but this time hold the Option key.
    That will bring up a grey screen with the image of the Macintosh HD and an image of the CD.  Click the image of the CD and let it boot that way.
    Once booted, go through the install proceedure, choose language, etc.  Still using the same CD but let's see if for some reason it does not like the way it is being told to boot.
    Ralph

  • How to create Tables and Fields in Java DI API?

    I have the problem to get the handle for IUserTabledMD.
    userTablesMD = (IUserTablesMD) getCompany().getBusinessObject(SBOCOMConstants.BoObjectTypes_oUserTables);
    does not work as in VB (getCompany() gets the ICompany handle).
    and
    userTablesMD = SBOCOMUtil.getUserTablesMD(getCompany(),"");
    needs an additional String!?!?!?!?
    How to get the handle to create new user defined tables?
    I think Fields needs the same methods.
    Regards, Frank.

    could you send me code for creating table using java

  • Best mac pro specification to handle large photoshop files

    I'm about to buy a mac pro and want some advice on where I should be spending my money to get the best performance?
    I use Photoshop to create large pieces of artwork (over 2m square) that contain approx 100 layers and require a 300dpi resolution for printing. File sizes are around 8bg before flattening.
    I have tried using the standard demo mac pros available to handle files but with little success. I assume I need to boot up the ram (from Crucial) but how much should I consider, is it worth getting faster processor, separate hard drive for scratch disk, better graphics card etc?
    Obviously all but with limited funds which are more important?
    Thanks in anticipation!
    Jacqui

    Head over to http://www.macgurus.com and look down the left side toward bottom for the Guide to Photoshop Acceleration.
    http://homepage.mac.com/boots911/.Public/PhotoshopAccelerationBasics2.4W.pdf
    I would boot from a stripped array, a pair of 10K Raptor 300GB model.
    http://barefeats.com/hard103.html
    Then upgrade to 16GB or 32GB of memory.
    http://www.barefeats.com/harper3.html
    External RAID for scratch that could be 2, 4 or more drives, and another RAID for saving your work.
    And with RAID, you want a couple backups for non-temp files of course.
    http://www.barefeats.com/hard101.html - WD VelociRaptor
    http://www.barefeats.com/harper13.html - 4 drive RAID: SAS vs SATA
    http://www.barefeats.com/hard94.html - 1TB drives
    http://www.barefeats.com/harper14.html - WD 640GB Caviar
    http://www.barefeats.com/harper9.html - Boot drives

  • Creating table on production database

    Hi expert I want some real time knowledge
    If a user requested create a table on production database where DBA a should contact 1st.
    form where dba get approval for create table.
    Thanks & Regards
    Sanat

    are you asking who should DBA contact to ask if its ok to create a table for a user request?
    is there a process in place to handle user requests? Follow it. If there isnt, put one in place and ask user to follow it too.
    usually some managers approval which then comes to you to review.

  • Create table dynamically

    I need help creating a table dynamically. i have a view in one database. i would like to create a table in another instance using the view structure of a view which is in another instance. the problem i am having is that some columns in the view are always null so they appear as a varchar2 datatype without lenght.
    when i do an insert/select it does not create the table because of this problem. so i would like to know if anybody know how to create a script to handle this case and create my table dynamically.
    there was a script in the code tips section in oracle site but i lost that script. please provide code on how to do this. thanks

    Hi,
    SQL> create or replace view v as
      2    select null a, to_number(null) as b, to_date(null) as c,
      3      to_nchar(null) as d,
      4      11 as e, 1.11 as f,
      5      'fff' as g, to_nchar('cvfgfg') as h, sysdate as i
      6    from dual;
    View created.
    SQL> DECLARE
      2    vCreate_Sql VARCHAR2(32000);
      3    vFirst_Col BOOLEAN;
      4  BEGIN
      5    vCreate_Sql := 'CREATE TABLE T (';
      6    vFirst_Col := TRUE;
      7    FOR cRec IN (
      8      SELECT Column_Name, Data_Type, Data_Precision, Data_Scale, Char_Col_Decl_Length
      9      FROM User_Tab_Columns
    10      WHERE Table_Name = 'V'
    11    ) LOOP
    12      IF vFirst_Col THEN
    13        vFirst_Col := FALSE;
    14      ELSE
    15        vCreate_Sql := vCreate_Sql || ',';
    16      END IF;
    17 
    18      vCreate_Sql := vCreate_Sql || cRec.Column_Name || ' ' || cRec.Data_Type ||
    19        CASE
    20          WHEN cRec.Data_Type IN ('CHAR', 'VARCHAR2', 'NCHAR', 'NVARCHAR2') THEN
    21            '(' || TO_CHAR(GREATEST(1, cRec.Char_Col_Decl_Length)) || ')'
    22          WHEN cRec.Data_Type = 'NUMBER' THEN
    23            CASE
    24              WHEN cRec.Data_Precision IS NULL THEN ''
    25              WHEN cRec.Data_Precision IS NOT NULL AND cRec.Data_Scale IS NULL THEN
    26                '(' || TO_CHAR(cRec.Data_Precision) || ')'
    27              WHEN cRec.Data_Precision IS NOT NULL AND cRec.Data_Scale IS NOT NULL THEN
    28                '(' || TO_CHAR(cRec.Data_Precision) || ', ' || TO_CHAR(cRec.Data_Scale) || ')'
    29            END
    30            /* ... Possibly other datatypes */
    31          ELSE
    32            ''
    33        END;
    34    END LOOP;
    35    vCreate_Sql := vCreate_Sql || ')';
    36 
    37    EXECUTE IMMEDIATE vCreate_Sql;
    38  END;
    39  /
    PL/SQL procedure successfully completed.
    SQL> desc v
    Name                                      Null?    Type
    A                                                  VARCHAR2
    B                                                  NUMBER
    C                                                  DATE
    D                                                  VARCHAR2
    E                                                  NUMBER
    F                                                  NUMBER
    G                                                  CHAR(3)
    H                                                  NVARCHAR2(6)
    I                                                  DATE
    SQL> desc t
    Name                                      Null?    Type
    A                                                  VARCHAR2(1)
    B                                                  NUMBER
    C                                                  DATE
    D                                                  VARCHAR2(1)
    E                                                  NUMBER
    F                                                  NUMBER
    G                                                  CHAR(3)
    H                                                  NVARCHAR2(6)
    I                                                  DATERegards,
    Dima

  • Creating Table Partitions

    Does someone can explain me how to create Table Partition in Designer?
    I find nothing in the help content...
    thanks
    Chris

    Hi Uli,
    Partitions are not yet defined in the ODI metadata, you could add a step in the DDL procedure generated by CFD that would handle the creation of the partition.
    Thanks,
    Julien

  • Can I create tables that are subsets of my master table?

    I would like to create tables (or sheets) that are subsets of the master table so that I can view different subsets of data in smaller chunks. I would like to continue to enter data in the master - and have it reflected in the subsets. Possible?
    Thank you

    Would this do what you want?
    Create a table for your subset of info. In its first cell, enter "=" & then click on the cell in the master table that you want displayed in that cell of the new table. You will get a formula of the type:
    =Table 1 :: B2
    where "B2" will be whatever cell you clicked on in Table 1.
    You can extend this formula downward or rightward with the circular blue fill handle to easily display adjacent row or column cells from the master table. You can also repeat the process starting with a new cell in the new table to display as many or as few cells of the master as you want. (You could even display different row or column values from the master in the same row or column of the new table, but I'm not sure that would be of any use.)
    Once you get the subset table set up as you want, lock it so that you cannot accidentally change its cell contents to something else.
    The result is a table slaved to the master which will automatically show any changes to the master but otherwise cannot be altered. This table can also be copied to other sheets & the formulas will be updated with the sheet reference automatically.
    The only drawbacks to this approach that I know of are that you can't enter data into the subset table (which may be a good or bad thing) & that empty cells in the master will be represented by zeros in the subset table. An 'IF(ISBLANK())" formula addition would take care of that but may not be needed.

  • How does impdp handles external tables

    I am just done with schema import and one of the package is invalid because it is referring the External Table. I am getting the error " Table or View does not exist".
    How does impdp handles external tables ?
    Do we need to replicate the directories and files from the source to imported destination ?
    Thanks

    Hi,
    Yes...
    external table directory not available on imported destination operating system
    You need to create the directories and files from the source to imported destination
    Recompile the invalid package
    Thanks

  • How can i edit perticular row in dynamically created table

    Hi to All,
    Here my requirement is create table dynamically from existing XML and first column with radio buttons,column data and row wise data there on XML but i'm able to create table and displaying data then whenever i click on first column radio button that row editable and remaining rows in disable mode then i edit that row and click on save button that particular row data will be inserted to XML.Please tell me how can i achieve this requirement.
    Thanks and Regards,
    surya.

    Hi surya
    - Use RadioButtonGroupByIndex for the first column.
    - Disable automatic change of table's lead selection: selectionChangeBehaviour = manual, selectionMode = none.
    - In onSelect event handler of the RadioButtonGroupByIndex set new table's lead selection from the code to the row where the button is clicked.
    - Add calculated read-only attribute isRowEditable (boolean) to the table's node. Getter shall be like this:
    return (element.index() == element.node().getLeadSelection());
    - Bind the cell editors' enabled property to isRowEditable attribute.
    BR, Siarhei
    PS: this is my message #666 - do not trust it
    Edited by: Siarhei Pisarenka on Feb 23, 2010 2:29 PM

Maybe you are looking for