Loading data into the table by file name

Hi all

I am new to ODI. I have a requirement of loading a flat file in oracle, as well as the name of the file in a single column of the table. This means that, if there are 10 rows of data from this file, then the extra column "FileName" to the table will be the name of the active file written 10 times. Please suggest how this can be achieved. I am able to do half of it but the file name is not filled.

Thank you.

Hello

See the link below for dynamic fair value can be useful for you

http://blogs.Oracle.com/dataintegration/2009/04/using_parameters_in_odi_the_dy_1.html

Thank you
Merlina.

Tags: Business Intelligence

Similar Questions

  • How to load data into the table of correspondence in OIM 11 g

    Hello
    I have a lot of data that must be loaded into the table of choice as Codekey and decode. How can I load the data in bulk instead of manually via console Design?

    Is it possible to do? No API IOM or any what SQL query

    Kind regards
    JS

    Here's what you need to get.

    psLookupCode - search name,
    psValue - Code key
    psDescriptivevalue - DecodeKey

    The rest can be empty.

    addLookupValue

    void addLookupValue (java.lang.String psLookupCode,
    java.lang.String psValue,
    java.lang.String psDescriptiveValue,
    java.lang.String psLanguage,
    java.lang.String psCountry)
    throws Thor.API.Exceptions.tcAPIException,
    Thor.API.Exceptions.tcInvalidLookupException,
    Thor.API.Exceptions.tcInvalidValueException,
    tcAPIException adds a new entry for the specified search

    Parameters:
    psLookupCode - the Code for the definition of research
    psValue - the value that will be stored in the database
    psDescriptiveValue - a descriptive version of the value to be added
    psLanguage - the language for the added entry. Leave blank to accept the default value (en)
    psCountry - country for the specified entry. Leave blank to accept the default (US)

    Throws: tcAPIException tcInvalidLookupException - thrown if the search Code is no tcInvalidValueException - thrown if the value cannot be added to the list of choices (because it's a double, etc.)

    M

  • How to load data into the App MVDEMO schema example

    Hi all

    I'm a POC on Oracle Mapviewer and try to build some reports in OBIEE using MApviewer.

    This POC, I use Oracle MVDEMO example Data (11g). I think that these sample data covers few countries like the USA.

    I need to make PDS for the Brazil, I downloaded data from the map of the site as Shapefiles Brazil

    http://GADM.org/country

    in these data of the Brazil, I got from .csv files 4 extensions, .dbf, .shp and SHX

    I need to know how can I load these files into my Oracle 11 g DB? Should I load data into the same pattern of mvdemo, if yes then which table?

    Any help will be appreciated a lot.

    Thank you

    Amit

    Use the Java shapefile Converter utility (http://www.oracle.com/technetwork/database/options/spatialandgraph/downloads/index-093371.html)

    GDAL (gdal.org) FME (Safe) or or MapBuilder.

    Specify the to SRID (i.e. the SRID for loading in Oracle geoms) 4326 or 8307.

    Load into a new table named anything you want. for example brazil_gadm with the geometry named GEOMETRY column

    Once it's loaded, verify that there is an entry for the table and column (BRAZIL_GADM, GEOMETRY) in user_sdo_geom_metadata

    Create a space on brazil_gadm.geometry index if the tool has not created a.

    Add the definitions of topic for the country, State or whatever the admin areas exist in the dataset.

    Import them as layers in OBIEE.

  • Loading data into the APEX problem

    Hello world...

    I am new to Oracle APEX and I am facing problems loading the data into the table. My problem is the text data are load with double quotes.

    Please suggest.

    Thank you
    Suresh

    Hello

    assuming that you load the data via the UI APEX via home > SQL Workshop > utilities > data workshop > Load Data
    By also provide more information like the version used, APEX how/where you download data, etc.

    If you put your data in a file and select ' 'Download the file (separated by commas or tabs' then on the next screen, you can field 'Optionally Enclosed By' in double quotes ("").
    This should remove the double quotes of the data during the import.

    Concerning
    Bottom

  • What trigger to use to insert data into the table db forms

    Hello

    My form is current having a block of database with the table reference. When you enter data into the form field and click Save. Automatically record is inserted in the database table.
    I want to do this under manual insert. I changed the block of data to a data non-base. Where should I write the insert statement to insert data into the table.
    Is - shutter release key of the form-level validation?

    Please notify.

    Thank you
    Didi.

    You can guide me how to remove the message FRM-40401 no changes to save and instead, I wanted to put 1 transaction record successful... some like it like that.

    Hi didi.
    And this is my last post I'll sleep. ;)
    Take form level trigger named preform
    and write on it

    :SYSTEM.MESSAGE_LEVEL := 5;
    

    I hope this works...

    Hamid

    Mark correct/good to help others to get the right answers. *

  • How to insert data into the table by using the expression builder in the assign activity

    How to insert data into the table by using the expression builder in affect business in BPEl, I use SOA Suite 11.1.1.5
    Can someone help me please

    Hello

    I don't think that oraext:query-database() can insert data into the table.

    What are your needs?
    Can not you plan to use the DB adapter with the insert operation?

    Kind regards
    Neeraj Sehgal

  • ODI can load data into the planning and REPLACE the existing data?

    Hello
    ODI (9.3.1.1) can load data into the planning and REPLACE the existing data?
    Currently of our ODI by "ADD" load to existing data data - so that is I accidentally run the load twice, it would be double planning numbers. I don't know how to do it to REPLACE so that running more than twice has no effect.

    With the help of the essbase adapter you would use a rule of load, in the State of charge, you can set whether to replace or add to existing values. It is not difficult to pass.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • SQL Loader loading data into two Tables using a single CSV file

    Dear all,

    I have a requirement where in I need to load the data into 2 tables using a simple csv file.

    So I wrote the following control file. But it loads only the first table and also there nothing in the debug log file.

    Please suggest how to achieve this.

    Examples of data

    Source_system_code,Record_type,Source_System_Vendor_number,$vendor_name,Vendor_site_code,Address_line1,Address_line2,Address_line3

    Victor, New, Ven001, Vinay, Vin001, abc, def, xyz

    Control file script

    ================

    OPTIONS (errors = 0, skip = 1)
    load data
    replace
    in the table1 table:
    fields ended by ',' optionally surrounded "" "
    (
    Char Source_system_code (1) POSITION "ltrim (rtrim (:Source_system_code)),"
    Record_type tank "ltrim (rtrim (:Record_type)),"
    Source_System_Vendor_number tank "ltrim (rtrim (:Source_System_Vendor_number)),"
    $vendor_name tank "ltrim (rtrim (:Vendor_name)),"
    )
    in the Table2 table
    1 = 1
    fields ended by ',' optionally surrounded "" "
    (
    $vendor_name tank "ltrim (rtrim (:Vendor_name)),"
    Vendor_site_code tank "ltrim (rtrim (:Vendor_site_code)),"
    Address_line1 tank "ltrim (rtrim (:Address_line1)),"
    Address_line2 tank "ltrim (rtrim (:Address_line2)),"
    Address_line3 tank "ltrim (rtrim (:Address_line3)).
    )

    the problem here is loading into a table, only the first. (Table 1)

    Please guide me.

    Thank you

    Kumar

    When you do not provide a starting position for the first field in table2, it starts with the following after a last referenced in table1 field, then it starts with vendor_site_code, instead of $vendor_name.  So what you need to do instead, is specify position (1) to the first field in table2 and use the fields to fill.  In addition, he dislikes when 1 = 1, and he didn't need anyway.  See the example including the corrected below control file.

    Scott@orcl12c > test.dat TYPE of HOST

    Source_system_code, Record_type, Source_System_Vendor_number, $vendor_name, Vendor_site_code, Address_line1, Address_line2, Address_line3

    Victor, New, Ven001, Vinay, Vin001, abc, def, xyz

    Scott@orcl12c > test.ctl TYPE of HOST

    OPTIONS (errors = 0, skip = 1)

    load data

    replace

    in the table1 table:

    fields ended by ',' optionally surrounded "" "

    (

    Char Source_system_code (1) POSITION "ltrim (rtrim (:Source_system_code)),"

    Record_type tank "ltrim (rtrim (:Record_type)),"

    Source_System_Vendor_number tank "ltrim (rtrim (:Source_System_Vendor_number)),"

    $vendor_name tank "ltrim (rtrim (:Vendor_name)).

    )

    in the Table2 table

    fields ended by ',' optionally surrounded "" "

    (

    source_system_code FILL (1) POSITION.

    record_type FILLING,

    source_system_vendor_number FILLING,

    $vendor_name tank "ltrim (rtrim (:Vendor_name)),"

    Vendor_site_code tank "ltrim (rtrim (:Vendor_site_code)),"

    Address_line1 tank "ltrim (rtrim (:Address_line1)),"

    Address_line2 tank "ltrim (rtrim (:Address_line2)),"

    Address_line3 tank "ltrim (rtrim (:Address_line3)).

    )

    Scott@orcl12c > CREATE TABLE table1:

    2 (Source_system_code VARCHAR2 (13),)

    3 Record_type VARCHAR2 (11),

    4 Source_System_Vendor_number VARCHAR2 (27),

    5 $vendor_name VARCHAR2 (11))

    6.

    Table created.

    Scott@orcl12c > CREATE TABLE table2

    2 ($vendor_name VARCHAR2 (11),)

    3 Vendor_site_code VARCHAR2 (16).

    4 Address_line1 VARCHAR2 (13),

    5 Address_line2 VARCHAR2 (13),

    Address_line3 6 VARCHAR2 (13))

    7.

    Table created.

    Scott@orcl12c > HOST SQLLDR scott/tiger CONTROL = test.ctl DATA = test.dat LOG = test.log

    SQL * Loader: release 12.1.0.1.0 - Production on Thu Mar 26 01:43:30 2015

    Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

    Path used: classics

    Commit the point reached - the number of logical records 1

    TABLE1 table:

    1 row loaded successfully.

    Table TABLE2:

    1 row loaded successfully.

    Check the log file:

    test.log

    For more information on the charge.

    Scott@orcl12c > SELECT * FROM table1

    2.

    RECORD_TYPE SOURCE_SYSTEM_VENDOR_NUMBER $VENDOR_NAME SOURCE_SYSTEM

    ------------- ----------- --------------------------- -----------

    Victor Ven001 new Vinay

    1 selected line.

    Scott@orcl12c > SELECT * FROM table2

    2.

    $VENDOR_NAME VENDOR_SITE_CODE ADDRESS_LINE1 ADDRESS_LINE2 ADDRESS_LINE3

    ----------- ---------------- ------------- ------------- -------------

    Vinay Vin001 abc def xyz

    1 selected line.

    Scott@orcl12c >

  • Reading file from the ftp server and importing data into the table

    Hi experts,

    Well, basically, I text with different layout files have been uploaded to an ftp server. Now, I must write a procedure to recover these files, read and insert data into a table... what to do?

    your help would be greatly helpful.

    Thank you

    user9004152 wrote:
    http://it.Toolbox.com/wiki/index.php/Load_data_from_a_flat_file_into_an_Oracle_table

    See the link, hope it will work.

    It is an old method, using the utl_file_dir parameter that is now obsolete and which is frankly a waste of space when external tables can do exactly the same thing much more easily.

  • Load xml data into the table

    Hi all

    I have an XML (emp.xml) with data below:

    -< root >
    -< row >
    < name > steve < / lastname >
    < 30 > < / Age >
    < / row >
    -< row >
    < name > Paul < / lastname >
    <>26 < / Age >
    < / row >
    < / root >

    I would like to create a stored procedure to store the xml data into the EMP table.

    EMP
    LastName age
    Steve 30
    Paul 26

    I tried to watch all threads related to this forum, but cannot find the right wire. Any help is greatly appreciated. Thank you

    With

    SQL>  select * from xmltable('root/row' passing xmltype('
    
    steve
    30
    
    
    Paul
    26
    
    ') columns lastname path 'lastname',
                       Age path 'Age')
    /
    LASTNAME   AGE
    ---------- ----------
    steve      30
    Paul       26   
    

    You can now just make a

    Insert into emp as select...

  • loading data into the newly created table

    I have a basic question


    I have a table named 'A' and it has 5 columns

    Now, I created a new table 'B' and copied the 4 columns of table "A".

    Now, I have to add the 5th column along wiith given in table "B".

    my table for 'B' have now 5 columns and the same data that the table 'one '.

    Could someone tell me the procedure. According to my knowledge, it is not possible. Can I even the reason for it.

    Note: With let them down my new table

    Thanks and greetings
    Pallis

    Assumption: You have the following table:

    Table1 (a number, b, c number, number d, e number);

    You made Table2 from table1 as below with the same data as for these 4 columns table1 table2.
    Table1 (a number, b number, number c number d)

    Now, you want to copy the e column too in table1 from table2...

    Means the simplest is:

    drop table table2;
    crate table table2 as select a,b,c,d,e from table1;
    

    Another way is:

    alter table table2 add e number;
    
    update table2  t2
    set  t2.e = ( select t1.e from table1 t1 where t1.a=t2.a and t1.b=t2.b and t1.c=t2.c and t1.d=t2.d);
    

    If you have the primary key on table1, then only the primary columns must be mapped in this inner query where clause.

    Kind regards...

  • Need a sql script loader to load data into a table

    Hello

    IM new to Oracle... Learn some basic things... and now I want the steps to do to load the data from a table dump file...

    and the script for sql loader

    Thanks in advance

    Hello

    You can do all these steps for loading data...

    Step 1:

    Create a table in Toad to load your data...

    Step 2:

    Creating a data file... Create your data file with column headers...

    Step 3:

    Creating a control file... Create your control file to load the data from the table data file (there is a structure of control file, you can search through the net)

    Step 4:

    Move the data file and the control file in the path of the server...

    Step 5:

    Load the data into the staging table using sql loader.

    sqlldr control = data =

    connect as: username/password@instance.

  • Load data into a table

    Hi friends,

    I'm trying to load records into the rules of the product table of the table with the following...

    create table product)

    prod_id varchar2 (20).

    prod_grp varchar2 (20).

    from_amt number (10),

    to_amt number (10),

    share_amt number (10)

    );

    Insert into product (prod_id, prod_grp, from_amt, share_amt) Values ('10037', "STK", 1, 18);

    Insert into product (prod_id, prod_grp, from_amt, share_amt) Values ('10037', "NSTK", 1: 16.2);

    Insert into product (prod_id, prod_grp, from_amt, to_amt, share_amt) Values ('10038', "NSTK", 1, 5000, 12);

    Insert into product (prod_id, prod_grp, from_amt, to_amt, share_amt) Values ('10038', "STK", 5001, 10000, 16);

    Insert into product (prod_id, prod_grp, from_amt, share_amt) Values ('10038', "STK", 10001, 20);

    Insert into product (prod_id, prod_grp, from_amt, to_amt, share_amt) Values ('10039', "NSTK", 1, 8000, 10);

    Insert into product (prod_id, prod_grp, from_amt, share_amt) Values ('10039', "STK", 8001, 12);

    create table rules)

    rule_id varchar2 (30),

    rule_grp varchar2 (10),

    rate_1 number (10),

    point_1 number (10),

    rate_2 number (10),

    point_2 number (10),

    rate_3 number (10),

    point_3 number (10)

    );

    Criteria of loading in the rules of the table:

    rule_id - "RL" | Product.prod_id

    rule_grp - product.prod_grp

    rate_1 - product.share_amt where from_amt = 1

    point_1 - product.to_amt

    rate_2 - if product.to_amt in point_1 is not NULL, then find product.share_amt of the next record with the same rule_id/prod_id where from_amt (of the next record) = to_amt (current record -

    point_1) + 1

    point_2 - if product.to_amt in point_1 is not NULL, then find product.to_amt of the next record with the same rule_id/prod_id where from_amt (of the next record) = to_amt (current record - )

    point_1) + 1

    rate_3 - if product.to_amt in point_2 is not NULL, then find product.share_amt of the next record with the same rule_id/prod_id where from_amt (of the next record) = to_amt(current )

    Enregistrement-point_2) + 1

    point_3 - if product.to_amt in point_2 is not NULL, then find product.to_amt of the next record with the same rule_id/prod_id where from_amt (of the next record) = to_amt (current record - )

    point_2) + 1

    I tried to load the first columns (rule_id, rule_grp, rate_1, point_1, rate_2, point_2) via the sql loader.

    SQL > select * from product;

    PROD_ID PROD_GRP FROM_AMT TO_AMT SHARE_AMT

    -------------------- -------------------- ---------- ---------- ----------

    10037                STK                           1                    18

    10037                NSTK                          1                    16

    1 5000 12 NSTK 10038

    10038 5001-10000-16 STK.

    10038 10001 20 STK.

    10039 1 8000 10 NSTK

    10039                STK                        8001                    12

    produit.dat

    PROD_ID | PROD_GRP | FROM_AMT | TO_AMT | SHARE_AMT

    "10037' |'. STK' | 1. 18

    "10037' |'. NSTK' | 1. 16.2

    '10038' |' NSTK' | 1. 5000 | 12

    '10038' |' STK' | 5001 | 10000 | 16

    '10038' |' STK' | 10001 | 20

    "10039' |'. NSTK' | 1. 8000 | 10

    "10039' |'. STK' | 8001 | 12

    Product.CTL

    options (Skip = 1)

    load data

    in the table rules

    fields ended by ' |'

    surrounded of possibly ' '.

    trailing nullcols

    (rule_id POSITION (1) ""RL"|: rule_id")

    rule_grp

    from_amt BOUNDFILLER

    point_1

    share_amt BOUNDFILLER

    , rate_1 ' BOX WHEN: from_amt = 1 THEN: share_amt END.

    , rate_2 expression "(sélectionnez pr.share_amt de produit pr où: point_1 n'est pas null et pr.prod_id=:rule_id et: point_1 =: from_amt + 1)" "

    , expression point_2 "(sélectionnez pr.to_amt de produit pr où: point_1 n'est pas null et pr.prod_id=:rule_id et: point_1 =: from_amt + 1)" "

    )

    He has not any support only values in rate_2, point_2... no error either... Not sure if there is another method to do this...

    Please give your suggestions... Thank you very much for your time

    Hello

    Thanks for posting the CREATE TABLE and INSERT instructions for the sample data; It's very useful!

    Don't forget to post the exact results you want from this data in the sample, i.e. what you want the rule table to contain once the task is completed.

    As ground has said, there is no interest to use SQLLDR to copy data from one table to another in the same database.  Use INSERT, or perhaps MERGE.

    2817195 wrote:

    Thank you for your answers... I thought it would be easier to manipulate the data using sql loader... I tried to use insert but do not know how to insert values in point_2, rate_3, rate_2, point_3, columns... For example, when point_1 is not null, need to do a find for the next with the same rule_id record and if the inserted record = pr.from_amt + 1 point_1 then RATE_2 should be inserted with this pr.share_amt of this record...

    SQL > insert into the rules)

    2 rule_id,

    rule_grp 3,.

    rate_1 4,.

    point_1 5,.

    rate_2 6,.

    point_2 7,.

    rate_3 8,.

    9 point_3)

    10. Select

    11 'RL ' | PR.prod_id RULE_ID,

    12 pr.prod_grp RULE_GRP,

    13 CASES WHEN END of pr.from_amt = 1 THEN pr.share_amt RATE_1,

    14 pr.to_amt POINT_1,

    15 (select pr.share_amt from product pr where point_1 is not null and rules.rule_id = pr.prod_id and point_1 = pr.from_amt + 1) RATE_2,

    16 (select pr.to_amt from product pr where point_1 is not null and rules.rule_id = pr.prod_id and = pr.from_amt + 1 point_1) POINT_2,.

    17 (select pr.share_amt from product pr where point_2 is not null and rules.rule_id = pr.prod_id and = pr.from_amt + 1 point_2) RATE_3,.

    18 (select pr.to_amt from product pr where point_2 is not null and rules.rule_id = pr.prod_id and = pr.from_amt + 1 point_2) POINT_3

    19 product pr;

    (select pr.share_amt from product pr where point_1 is not null and point_1 = pr.from_amt + 1) RATE_2,

    *

    ERROR on line 15:

    ORA-00904: "POINT_1": invalid identifier

    Help, please... Thank you very much

    This is what causes the error:

    The subquery on line 15 references only 1 table in the FROM clause, and this table is produced.  There is no point_1 column in the product.

    A scalar subquery like this can be correlated to a table in the Super request, but the only table in the FROM (line 19) clause is also produced.  Since the only table that you read is produced, only columns that you can read are the columns of the product table.

    You use the same table alias (pr) to mean different things 5. It's very confusing.  Create aliases for single table in any SQL statement.  (What you trying to do, I bet you can do without all these subqueries, in any case.)

  • Impossible to insert xml data into the table

    HII All,
    I'm unable to parse the following xml file and insert them into the table.


    Version of DB
    ======
    SQL> SELECT *
      2  FROM V$VERSION;
    
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for Solaris: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    My DB Table
    Create table rgh_xml_storage
    (
    user_id       varchar2(4000),
    to_type          varchar2(4000),
    mail_id          varchar2(4000),
    subject         varchar2(4000),
    sentDateTime    varchar2(4000)
    )
    Published by: RUSSO April 7, 2011 04:19

    Hello

    Please provide all pertinent details!

    Please correct my insert if statement it must be.

    You have a few bad XPath.
    Here's a way to unnest correctly repeated elements:

    SQL> select x1.user_id,
      2         x1.subject,
      3         x1.sentDateTime,
      4         x2.to_type,
      5         x2.mail_id
      6         --x1.messageBody
      7  from xmltable(
      8    '/emailMessage'
      9    passing xmltype(bfilename('TEST_DIR','email.xml'), nls_charset_id('CHAR_CS'))
     10    columns user_id      varchar2(4000)  path 'headerInformation/sender/user/@userID',
     11            subject      varchar2(4000)  path 'headerInformation/subject',
     12            sentDateTime varchar2(4000)  path 'headerInformation/sentDateTime',
     13            messageBody  clob            path 'messageBody',
     14            my_xml       xmltype         path 'headerInformation/recipients'
     15   ) x1,
     16   xmltable(
     17    '/recipients/recipient'
     18    passing x1.my_xml
     19    columns to_type      varchar2(4000)  path '@type',
     20            mail_id      varchar2(4000)  path 'user/@emailAddress'
     21   ) x2
     22  ;
    
    USER_ID              SUBJECT                                          SENTDATETIME                   TO_TYPE   MAIL_ID
    -------------------- ------------------------------------------------ ------------------------------ --------- ------------------------------------------
    RC58522              Re: CAA - Schlesinger ' Arnold   - LP01115771    Fri Oct 10 13:31:53 EDT 2010   to        [email protected]
    RC58522              Re: CAA - Schlesinger ' Arnold   - LP01115771    Fri Oct 10 13:31:53 EDT 2010   cc        [email protected]
    RC58522              Re: CAA - Schlesinger ' Arnold   - LP01115771    Fri Oct 10 13:31:53 EDT 2010   cc        [email protected]
    RC58522              Re: CAA - Schlesinger ' Arnold   - LP01115771    Fri Oct 10 13:31:53 EDT 2010   cc        [email protected]
    RC58522              Re: CAA - Schlesinger ' Arnold   - LP01115771    Fri Oct 10 13:31:53 EDT 2010   cc        [email protected]
    RC58522              Re: CAA - Schlesinger ' Arnold   - LP01115771    Fri Oct 10 13:31:53 EDT 2010   cc        [email protected]
    RC58522              Re: CAA - Schlesinger ' Arnold   - LP01115771    Fri Oct 10 13:31:53 EDT 2010   cc        [email protected]
    RC58522              Re: CAA - Schlesinger ' Arnold   - LP01115771    Fri Oct 10 13:31:53 EDT 2010   bcc       [email protected]
    RC58522              Re: CAA - Schlesinger ' Arnold   - LP01115771    Fri Oct 10 13:31:53 EDT 2010   bcc       [email protected]
    RC58522              Re: CAA - Schlesinger ' Arnold   - LP01115771    Fri Oct 10 13:31:53 EDT 2010   bcc       [email protected]
    RC58522              Re: CAA - Schlesinger ' Arnold   - LP01115771    Fri Oct 10 13:31:53 EDT 2010   bcc       [email protected]
    RC58522              Re: CAA - Schlesinger ' Arnold   - LP01115771    Fri Oct 10 13:31:53 EDT 2010   bcc       [email protected]
    RC58522              Re: CAA - Schlesinger ' Arnold   - LP01115771    Fri Oct 10 13:31:53 EDT 2010   bcc       [email protected]
    
    13 rows selected
     
    
  • inserting data into the table

    Hi all
    I use forms [32 bit] Version 6.0.8.24.1 (Production)
    Oracle Database 10g Release 10.2.0.1.0 - Production
    I have settings such as the (optional) emp_code and the year (mandatory field - four digits).
    Based on the setting that I have to get the detail of a table and these must be inserted at the other table with columns of additions (to hardcode the additional columns).
    To achieve this, I intend to get a cursor by selecting the required fields in the table by the way the where clause of the cursor parameters.
    by making a loop through the cursor I will insert the records in the other table.
    Here, the thing is that the data is going to be huge (since the year is the parameter).
    so my approach causes the performance issue.
    I heard that there is a different method of insetions
    can anyone suggest me the best way (performance wise) other than what I mentioned (if you are aware of)...

    Thank you...

    user13329002 wrote:
    Thanks for everyone.
    I have to take the data from the table as e_name, e_code, of the table and insert it into another table with some other values such as
    e_name, e_code, as well as I add 'n', 'o'.
    its something like

    insert into e_emp(emp_name,emp_code,emp_add,emp_status,emp_type)
    select e_name,e_code,e_add,'O','N')
    from e_table
    where e_date = Parameter.
    

    in other words, the values for Emp_status, emp_type I have no values in the e_table.so table and enter in e_table I have to hard code it.
    CAL I hard code as I mentioned in my statement example

    can someone clear me of the foregoing.

    Thank you...

    Published by: user13329002 on February 15, 2011 20:11

    Yes... You can hardcode the values for Emp_status, emp_type.

    SQL> CREATE TABLE e_emp(emp_code NUMBER(10),emp_status VARCHAR2(1),emp_type VARCHAR2(1));
    
    Table created.
    
    SQL> create table e_table as (select * from e_emp);
    
    Table created.
    
    SQL> INSERT INTO e_table(emp_code) VALUES('1111');
    
    1 row created.
    
    SQL> insert into e_table(emp_code) values('2222');
    
    1 row created.
    
    SQL> select * from e_table;
    
      EMP_CODE E E
    ---------- - -
          1111
          2222
    
    SQL> insert into e_emp(emp_code,emp_status,emp_type) (select emp_code,'0','N' from e_table);
    
    2 rows created.
    
    SQL> select * from e_emp;
    
      EMP_CODE E E
    ---------- - -
          1111 0 N
          2222 0 N
    
    SQL> 
    

    I hope this helps.

    Kind regards
    Claudy

Maybe you are looking for

  • Why my apple wireless mouse scrolls only one direction?

    my mouse scrolls only in... and not return to the top of the page... ?  It's only a recent thing... I think... I tried all the obvious things... batteries... Stop... etc... any help out there?

  • Disable Remoting on EA9500

    How to disable remote access on the EA9500? The firmware help documentation mentions an option to disable access, but the option is not present in firmware. Port 80 is open on the side WAN.

  • My Lexmark X 6170 printer shows paper jam but there is no paper in it. Does someone has had this problem before and fixeed it?

    My Lexmark X 6170 printer behaves as if it had a paper jam and the message says: "Turn power then clear paper jam. but there is no paper in it. Have you had the same problem? Ramon Jule SR.

  • Screen saver is blurred.

    I went to a web page called screensaver.com popular, I downloaded a few images of the screensaver for my screensaver. Now I have problems with my screen saver, it's blurred, I choose each screensaver is blurry, can you help me please? Sorry I meant d

  • Vista connection to an iMAC

    Continue to try to connect via windows vista for my iMac.  I can see my MAc on the wireless network, but it asks me a username and password.  No matter what I enter, I can not connect.  The username has a head in the window of entry and by default, t