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

Tags: Database

Similar Questions

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

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

  • 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

  • Load data into a table from two sources

    I developed an interface that has tables of the source of a source database that contains data of 4 companies. (we have multiple servers for different companies). Now, there is a requirement to load the data to another company in the same data warehouse. The problem is that the source is on another server. The database structure is the same. The names of tables, constraints are the same.

    I can't just duplicate my previous interface and change the data source to this interface. -Does anyone know how to do this. I have about 50 + such interface of re - developing another interface is quite a tedious task.

    Hello

    Here are links to examples of the context, in the examples they use development and Production environments in order to demonstrate the different environments.  In your project, it will be the different companies.  Create a context for each company, provided that the scheme remains the same across companies.

    https://blogs.Oracle.com/dataintegration/entry/executing_the_same_code_in_all

    Context, physical and logical schema - how does it work? -ODIExperts.com

    http://www.odigurus.com/2011/10/ODI-contexts.html

    Thank you

    ARV

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

  • Load data from one table into another table of 2 different schemes

    Hello

    We have a requirement to insert data into a table in a schema of a table that is in other schemas in ODI.

    We are able to do so by creating interfaces and mappings. But we now expect to do using SQL instead of ODI interfaces.

    Is it possible to do this using the SQL statements we have source and target data sources defined in ODI.

    should be like "Insert into src.table select * from tar.table'"

    Thank you...

    Hello

    If you try to load a db to another db using sql (sql free hand) instead of interfaces instructions.

    It is possible using procedures odi too.

    1. Select the project (designer navigator) odi mode

    2. create the new procedure. Then add the command.

    in this command on the source command on the tabs of the target.

    Enter the sql statements. See the screenshots below...

    I think this will help for you,

    Thank you best regards &,.

    A.Kavya

  • 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

  • Loading XML into a Table

    Hi all
    I want to create a procedure in which, I provided the name of the table and the location of the XML file, the procedure goes to this place and pick the file XML and load it into the table. Can it is possible?

    Thank you

    Best regards


    Adil

    Finally, I got your issue! It is the use of DBMS_LOB. LOADFROMFILE, I used DBMS_LOB. LOADCLOBFROMFILE instead. It was actually loading the binary content!. This is a fully functional code based on your table and XML file structure.
    The XML file, I used:

    
    
    
    28004125
    251942
    05-SEP-92
    400
    513
    1
    0
    
    
    28004125
    251943
    04-OCT-92
    400
    513
    1
    0
    
    
    

    True PL/SQL code:

    SQL> /* Creating Your table */
    SQL> CREATE TABLE IBSCOLYTD
      2  (
      3  ACTNOI VARCHAR2 (8),
      4  MEMONOI NUMBER (7,0),
      5  MEMODTEI DATE,
      6  AMOUNTI NUMBER (8,0),
      7  BRCDSI NUMBER (4,0),
      8  TYPEI NUMBER (4,0),
      9  TRANSMONI NUMBER (6,0)
     10  );
    
    Table created.
    
    SQL> CREATE OR REPLACE PROCEDURE insert_xml_emps(p_directory in varchar2,
      2                                              p_filename  in varchar2,
      3                                              vtableName  in varchar2) as
      4    v_filelocator    BFILE;
      5    v_cloblocator    CLOB;
      6    l_ctx            DBMS_XMLSTORE.CTXTYPE;
      7    l_rows           NUMBER;
      8    v_amount_to_load NUMBER;
      9    dest_offset      NUMBER := 1;
     10    src_offset       NUMBER := 1;
     11    lang_context     NUMBER := DBMS_LOB.DEFAULT_LANG_CTX;
     12    warning          NUMBER;
     13  BEGIN
     14    dbms_lob.createtemporary(v_cloblocator, true);
     15    v_filelocator := bfilename(p_directory, p_filename);
     16    dbms_lob.open(v_filelocator, dbms_lob.file_readonly);
     17    v_amount_to_load := DBMS_LOB.getlength(v_filelocator);
     18    ---  ***This line is changed*** ---
     19    DBMS_LOB.LOADCLOBFROMFILE(v_cloblocator,
     20                              v_filelocator,
     21                              v_amount_to_load,
     22                              dest_offset,
     23                              src_offset,
     24                              0,
     25                              lang_context,
     26                              warning);
     27
     28    l_ctx := DBMS_XMLSTORE.newContext(vTableName);
     29    DBMS_XMLSTORE.setRowTag(l_ctx, 'ROWSET');
     30    DBMS_XMLSTORE.setRowTag(l_ctx, 'IBSCOLYTD');
     31    -- clear the update settings
     32    DBMS_XMLStore.clearUpdateColumnList(l_ctx);
     33    -- set the columns to be updated as a list of values
     34    DBMS_XMLStore.setUpdateColumn(l_ctx, 'ACTNOI');
     35    DBMS_XMLStore.setUpdateColumn(l_ctx, 'MEMONOI');
     36    DBMS_XMLStore.setUpdatecolumn(l_ctx, 'MEMODTEI');
     37    DBMS_XMLStore.setUpdatecolumn(l_ctx, 'AMOUNTI');
     38    DBMS_XMLStore.setUpdatecolumn(l_ctx, 'BRCDSI');
     39    DBMS_XMLStore.setUpdatecolumn(l_ctx, 'TYPEI');
     40    DBMS_XMLStore.setUpdatecolumn(l_ctx, 'TRANSMONI');
     41    -- Now insert the doc.
     42    l_rows := DBMS_XMLSTORE.insertxml(l_ctx, v_cloblocator);
     43    DBMS_XMLSTORE.closeContext(l_ctx);
     44    dbms_output.put_line(l_rows || ' rows inserted...');
     45    dbms_lob.close(v_filelocator);
     46    DBMS_LOB.FREETEMPORARY(v_cloblocator);
     47  END;
     48  /
    
    Procedure created.
    
    SQL> BEGIN
      2  insert_xml_emps('TEST_DIR','load.xml','IBSCOLYTD');
      3  END;
      4  /
    
    PL/SQL procedure successfully completed.
    
    SQL> SELECT * FROM ibscolytd;
    
    ACTNOI      MEMONOI MEMODTEI     AMOUNTI     BRCDSI      TYPEI  TRANSMONI
    -------- ---------- --------- ---------- ---------- ---------- ----------
    28004125     251942 05-SEP-92        400        513          1          0
    28004125     251943 04-OCT-92        400        513          1          0
    
    SQL> 
    
  • URGENT: How to load data into essbase R12 by ODI

    Hi all

    Could you please provide me with step by step document "How to load data into essbase R12 directly through the ODI".

    Kind regards

    Rubi

    Hello

    You need below KM

    RKM E-Business Suite

    IKM E-Business Suite (open Interface)

    then follow the link below

    Red shift: ODI for eBusiness Suite integration - in 4 steps

    Hope it helps

    Thank you

  • 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

  • Doubt about inserting data into a table

    Hi all, when I try to insert data into a table through an anonymous block, the pl/sql block runs successfully, but the data are not get inserted. Can someone please tell me where I am doing wrong?
    SQL> DECLARE
      2
      3  V_A NUMBER;
      4
      5  V_B NUMBER;
      6
      7  v_message varchar2(25);
      8
      9
     10  BEGIN
     11
     12
     13  select regal.regal_inv_landed_cost_seq.NEXTVAL into V_A from dual ;
     14
     15  select regal.regal_inv_landed_cost_seq.currval into V_B from dual ;
     16
     17  INSERT INTO rcv_transactions_interface
     18  (
     19               INTERFACE_TRANSACTION_ID,
     20               HEADER_INTERFACE_ID,
     21               GROUP_ID,
     22               TRANSACTION_TYPE,
     23               TRANSACTION_DATE,
     24               PROCESSING_STATUS_CODE,
     25               PROCESSING_MODE_CODE,
     26               TRANSACTION_STATUS_CODE,
     27               QUANTITY,
     28               LAST_UPDATE_DATE,
     29               LAST_UPDATED_BY,
     30               CREATION_DATE,
     31               CREATED_BY,
     32               RECEIPT_SOURCE_CODE,
     33               DESTINATION_TYPE_CODE,
     34               AUTO_TRANSACT_CODE,
     35               SOURCE_DOCUMENT_CODE,
     36               UNIT_OF_MEASURE,
     37               ITEM_ID,
     38               UOM_CODE,
     39               EMPLOYEE_ID,
     40               SHIPMENT_HEADER_ID,
     41               SHIPMENT_LINE_ID,
     42               TO_ORGANIZATION_ID,
     43               SUBINVENTORY,
     44               FROM_ORGANIZATION_ID,
     45               FROM_SUBINVENTORY
     46  )
     47
     48  SELECT
     49       regal.regal_inv_landed_cost_seq.nextval,      --Interface_transaction_
    id
     50       V_A,                                          --Header Interface ID
     51       V_B,                                          --Group ID
     52       'Ship',                                       --Transaction Type
     53       sysdate,                                      --Transaction Date
     54       'PENDING',                                    --Processing Status Code
    
     55       'BATCH',                                      --Processing Mode Code
     56       'PENDING',                                    --Transaction Status Cod
    e
     57       lc.quantity_received,                          --Quantity
     58       lc.last_update_date,                          --last update date
     59       lc.last_updated_by,                           --last updated by
     60       sysdate,                                      --creation date
     61       lc.created_by,                                --created by
     62       'INVENTORY',                                  --Receipt source Code
     63       'INVENTORY',                                  --Destination Type Code
     64       'DELIVER' ,                                    --AUT Transact Code
     65       'INVENTORY',                                  --Source Document Code
     66        msi.primary_uom_code ,                       --Unit Of Measure
     67        msi.inventory_item_id,                        --Item ID
     68        msi.primary_unit_of_measure,                  --UOM COde
     69        fnd.user_id,
     70        V_A,                                         --Shipment Header ID
     71        V_B,                                         --SHipment Line ID
     72        82,                                           --To Organization ID
     73        'Brooklyn',                                     --Sub Inventory ID
     74        81,                                            --From Organization
     75        'Vessel'                                       --From Subinventory
     76
     77    FROM
     78       regal.regal_inv_landed_cost_tab lc,
     79       fnd_user fnd,
     80       mtl_system_items msi
     81
     82    WHERE
     83       lc.organization_id = msi.organization_id
     84       AND  lc.inventory_item_id = msi.inventory_item_id
     85       AND  lc.created_by = fnd.created_by;
     86
     87  commit;
     88  v_message := SQL%ROWCOUNT;
     89  dbms_output.put_line('v_message');
     90  END;
     91  /
    v_message
    
    PL/SQL procedure successfully completed.
    SQL> select * from rcv_transactions_interface;
    
    no rows selected
    Thanks in advance!

    There is no problem with inserting data!
    Only there is no data! This means that your select statement retrieves no rows.
    You can see the output of your program (0). This means that there where no line in the result set.

    Please check the output of your tax return independently:

    SELECT
    --        regal.regal_inv_landed_cost_seq.nextval,      --Interface_transaction_id
     --       V_A,                                          --Header Interface ID
    --        V_B,                                          --Group ID
            'Ship',                                       --Transaction Type
            sysdate,                                      --Transaction Date
            'PENDING',                                    --Processing Status Code
            'BATCH',                                      --Processing Mode Code
            'PENDING',                                    --Transaction Status Code
            lc.quantity_received,                          --Quantity
            lc.last_update_date,                          --last update date
            lc.last_updated_by,                           --last updated by
            sysdate,                                      --creation date
            lc.created_by,                                --created by
            'INVENTORY',                                  --Receipt source Code
            'INVENTORY',                                  --Destination Type Code
            'DELIVER' ,                                    --AUT Transact Code
            'INVENTORY',                                  --Source Document Code
             msi.primary_uom_code ,                       --Unit Of Measure
             msi.inventory_item_id,                        --Item ID
             msi.primary_unit_of_measure,                  --UOM COde
             fnd.user_id,
      --       V_A,                                         --Shipment Header ID
    --         V_B,                                         --SHipment Line ID
             82,                                           --To Organization ID
             'Brooklyn',                                     --Sub Inventory ID
             81,                                            --From Organization
             'Vessel'                                       --From Subinventory
         FROM
            regal.regal_inv_landed_cost_tab lc,
            fnd_user fnd,
            mtl_system_items msi
         WHERE
            lc.organization_id = msi.organization_id
            AND  lc.inventory_item_id = msi.inventory_item_id
            AND  lc.created_by = fnd.created_by;
    

    Published by: hm on 13.10.2011 23:19

    I removed the references of the sequence and the variables V_A and YaeUb.
    BTW: Why do you want to include V_A and YaeUb in two different columns?

    The use of sequences in your code seems a bit strange to me. But this has nothing to do with your question.

  • A trial is possible before loading data into Essbase?

    Hi all

    I am trying to load data into Essbase, but I need to check in advance for any errors. Is there a way to test vacuum as we do in planning of loading utility?

    I am trying to load via a rule file!

    This thread comes to mind:
    http://www.Network54.com/Forum/58296/thread/1311019508/data+load+optimization+-headervs + column

    I try to stay away from my most entertaining reviews that it simply raises my bp.

    I would say that Essbase databases with incorrect data are the Essbase databases causing a lot of grief. I think that the OP certainly has the right idea, I don't think that the place to do so is Essbase.

    :)

    Kind regards

    Cameron Lackpour

    P.S. If it is a database of the OSB, I like your idea of a fictitious scenario, then a replacement of rule of load (groan) to move the data of this scenario, but even with a WHOLE CLEARBLOCK which will create a fragmentation.

    Published by: CL on August 30, 2011 14:31
    Well, the red stuff is in our veins, you know the stuff that carry oxygen to our body. That starts with a 'b' and ends with a "d"? This word is prohibited through OTN. As well as leather things you put on your feet. So weird. I had to post four times to understand what was get arrested.

Maybe you are looking for