Loading data from Z table to an ODS in BW/BI

Hello Gurus,
Can some one guide me how do I load data from a Z table which exists in the same BI system into an ODS/DSO. I'm working on a 04S system.
Your help is highly appreciated.
Thanks & Regards,
Prashanth

hi Prasanth
u r using generic extraction method to load data from R/3 to BW server
u can use
T.Code SBIW or RSO2 to create Generic DataSource.
step 1- logon to R/3 system
step2 - check data in table
     for this use t.code se11.
Db table name --- ZXXXXX.
1.     select " Display " button.
2.     select " contents"(shftctrlf11).--->execute.
*step-3 *- create generic datasource for trasactiona data
     enter t.code- rso2
     select t.data -
zXXXXX.(specify ur datasource name to create a new one).
     select create icon.
     appl.. component --- (browse and choose ur application component)(EX- sd).
     Extration from DBView"
     table/view---zXXXXX(give ur ztable name).
     text----give sht .des, m.des, L .des.......... for u data source.
     Select “generic delta” option in toolbar.
     Give delta specific field
     Field name---- (ex- pid)
•     Select any radio button(ex-numeric  pointer).
     Settings— “additive delta” radio button( for delta loads from ods to i.cube).
     Select “save”  “save” .
     Package -
some package name.
     Save
     Continiue
     Coustomize the datasource by seleting “ selection “ check boxes for fields.
     Save
     MSg:- datasource hve been created.
SAP BW side:
Step :1
Enter t.code rsa13.
     Identify R/3 source system icon.
     Double click on R/3 s . system.
     Expand BW datasource
     Expand sap Appl. Comp..
     Select ur application  component( for Ex- SD).
     Context menu -- replicate datasource
     Refresh tree once the replication is complete.
     Find ur datasource.
     Double click on data source icon { this implies data source is not assigned).
     Context menu
     Assign infosource..
     i.source assignment:
o     select “others” radio button
o     and select option”create”.
     Flexible update.-------XXXXX
     Des----XXXXXX
     Continue
     Create I.Obj w .r t r/3 s.s fields.
     Assign the I.Obj to the fields of r/3 respectively.
     Enter 0RECORDMODE in comm.. structure.
       Activate
     create ODS obj and create structure and activate
     create update rules for Ods object with reference to i.source. and activate.
     Create infopackage and schedule data…….and monitor the data in psa and ods objects tables.

Similar Messages

  • How to Load data from a Table in BW to R3 Table .. any FM or Program if you

    I want to load data from a Table in BW side to R3 side. Any FM or Program if you Know.

    If it is one time activity ..Download the data into excel file on BW side..
    Write an ABAP program to read the data from the excel file on local workstation and update table..

  • Using FDM to load data from oracle table (Integration Import Script)

    Hi,
    I am using Integration Import Script to load data from oracle table to worktables in FDM.
    i am getting following error while running the script.
    Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done
    Attaching the full error report
    ERROR:
    Code............................................. -2147217887
    Description...................................... Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
    At line: 22
    Procedure........................................ clsImpProcessMgr.fLoadAndProcessFile
    Component........................................ upsWObjectsDM
    Version.......................................... 1112
    Thread........................................... 6260
    IDENTIFICATION:
    User............................................. ******
    Computer Name.................................... *******
    App Name......................................... FDMAPP
    Client App....................................... WebClient
    CONNECTION:
    Provider......................................... ORAOLEDB.ORACLE
    Data Server......................................
    Database Name.................................... DBNAME
    Trusted Connect.................................. False
    Connect Status.. Connection Open
    GLOBALS:
    Location......................................... SCRTEST
    Location ID...................................... 750
    Location Seg..................................... 4
    Category......................................... FDM ACTUAL
    Category ID...................................... 13
    Period........................................... Jun - 2011
    Period ID........................................ 6/30/2011
    POV Local........................................ True
    Language......................................... 1033
    User Level....................................... 1
    All Partitions................................... True
    Is Auditor....................................... False
    I am using the following script
    Function ImpScrTest(strLoc, lngCatKey, dblPerKey, strWorkTableName)
    'Oracle Hyperion FDM Integration Import Script:
    'Created By:     Dhananjay
    'Date Created:     1/17/2012 10:29:53 AM
    'Purpose:A test script to import data from Oracle EBS tables
    Dim cnSS 'ADODB.Connection
    Dim strSQL 'SQL string
    Dim rs 'Recordset
    Dim rsAppend 'tTB table append rs object
    'Initialize objects
    Set cnSS = CreateObject("ADODB.Connection")
    Set rs = CreateObject("ADODB.Recordset")
    Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)
    'Connect to SQL Server database
    cnss.open "Provider=OraOLEDB.Oracle.1;Data Source= +server+;Initial Catalog= +catalog+;User ID= +uid+;Password= +pass+"
    'Create query string
    strSQL = "Select AMOUNT,DESCRIPTION,ACCOUNT,ENTITY FROM +catalog+.TEST_TMP"
    'Get data
    rs.Open strSQL, cnSS
    'Check for data
    If rs.bof And rs.eof Then
    RES.PlngActionType = 2
    RES.PstrActionValue = "No Records to load!"
    Exit Function
    End If
    'Loop through records and append to tTB table in location’s DB
    If Not rs.bof And Not rs.eof Then
    Do While Not rs.eof
    rsAppend.AddNew
    rsAppend.Fields("PartitionKey") = RES.PlngLocKey
    rsAppend.Fields("CatKey") = RES.PlngCatKey
    rsAppend.Fields("PeriodKey") = RES.PdtePerKey
    rsAppend.Fields("DataView") = "YTD"
    rsAppend.Fields("CalcAcctType") = 9
    rsAppend.Fields("Amount") = rs.fields("Amount").Value
    rsAppend.Fields("Desc1") = rs.fields("Description").Value
    rsAppend.Fields("Account") = rs.fields("Account").Value
    rsAppend.Fields("Entity") = rs.fields("Entity").Value
    rsAppend.Update
    rs.movenext
    Loop
    End If
    'Records loaded
    RES.PlngActionType = 6
    RES.PstrActionValue = "Import successful!"
    'Assign Return value
    SQLIntegration = True
    End Function
    Please help me on this
    Thanks,
    Dhananjay
    Edited by: DBS on Feb 9, 2012 10:21 PM

    Hi,
    I found the problem.It was because of the connection string.The format was different for oracle tables.
    PFB the format
    *cnss.open"Provider=OraOLEDB.Oracle.1;Data Source= servername:port/SID;Database= DB;User Id=aaaa;Password=aaaa;"*
    And thanks *SH* for quick response.
    So closing the thread......
    Thanks,
    Dhananjay

  • Loading data from multiple tables to multiple sheets of excel using SSIS

    I have a requirement in which I want to load data from 13 tables to 13 respective sheets of single excel file using SSIS.
    Can anyone know SSIS logic for developing package for this?

    see similar example here
    http://visakhm.blogspot.in/2013/09/exporting-sqlserver-data-to-multiple.html
    In your case you need to use loop to iterate through tables
    First get list of tables in a object variable created in SSIS using INFORMATION_SCHEMA.TABLES view
    Then add a for each loop based on ADO.NET variable enumerator to iterate through tables and inside loop follow method as in the above link to create the sheet first and populate it.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Load data from external table

    Hi ,
    How to load data from external table to transaction table using SQLLDR ?

    You use an external table to load the data it is described in the link to the manual I provided.
    Here is an example.
    Re: Using DML order to import a .xls file
    You would not be using SQLLDR though as external tables replace that functionality.

  • Loading data from one table to another table

    I need to load the data (data conversion) from one table to 3 different table.
    I have to load the data from Source table to following 3 target tables.
    So Consumer table has email pk and it has relationship with CONSUMER_RCV table and CONSUMER_RCV
    table has relationship with CONSUMER_ATTR table. I am doing right now with pl/sql but I am looking
    to use MULTI INSERT or SQL*LOADER or another efficient way.
    I tried with MultiInsert but it getting failed as it's violating Unique Constraints as source table might contains
    Duplicate emails.
    Could you please show me how I can load the data efficiently?
    Also I need to load in CONSUMER_ATTR table from CONTACT table which has ATTR1, ATTR2 columns.
    so My mapping will be ...
    Contact.email, first_name, last_name will go into Consumer table
    then in CONSUMER_RCV, I generate the id column value by sequence, load email and DATE_CREATEd from contact table
    And rest of the value is hard coded
    Then in CONSUMER_ATTR table I will generate the CONSUMER_ATTR_id through sequence, for ID, will use the same
    id column value which I have generated by sequence in CONSUMER_RCV, then put the attr_type = 'ATTR1' and for
    attr_value column I will insert the value from contact table's ATTR1 value,
    Then generate another CONSUMER_ATTR_ID, will use the same id column value which I have generated by sequence
    in CONSUMER_RCV, then put the attr_type = 'ATTR2' and for
    attr_value column I will insert the value from contact table's ATTR2 value,
    Please let me know if you need further explanation.
    I am using Oracle 9i R2.
    Please consider CONTACT is Source table, CONSUMER is a Target1, CONSUMER_RCV is a Target2 and CONSUMER_ATTR is a Target3
    to simplify the problem.
    Following is the Table structure
    =========================
    CREATE TABLE CONTACT (
    ID VARCHAR2 (40) NOT NULL, -- will go into Target1
    EMAIL VARCHAR2 (100) ,      -- might be duplicate and will go into Target1 and Target2
    FIRST_NAME VARCHAR2 (100) NOT NULL, -- will go into Target1
    LAST_NAME VARCHAR2 (100) NOT NULL, -- will go into Target1
    COUNTRY VARCHAR2 (40) NOT NULL, -- will go into Target1
    PHONE VARCHAR2 (100), -- will go into Target1
    NOTIFY VARCHAR2 (3), -- will go into Target2 table's RECEIVE_EMAIL column
    CREATE_DATE DATE ,               -- will go into Target1 and target2
    ATTR1 VARCHAR2 (400),           -- will go into Target3 as attr_type= ATTR1 and will load actual value in ATTR_VALUE
    ATTR2 VARCHAR2(100),          -- will go into Target3 as attr_type= ATTR2 and will load actual value in ATTR_VALUE
    ATTR2 VARCHAR2(100),          -- will go into Target3 as attr_type= ATTR1 and will load actual value in ATTR_VALUE
    CONSTRAINT CONTACT_PK
    PRIMARY KEY ( USER_ID ) ) ;
    CREATE TABLE CONSUMER(
    EMAIL VARCHAR2 (100) NOT NULL, -- PK
    TITLE VARCHAR2 (40),
    FIRST_NAME VARCHAR2 (40),
    LAST_NAME VARCHAR2 (40),
    ADDRESS1 VARCHAR2 (40),
    ADDRESS2 VARCHAR2 (40),
    CITY VARCHAR2 (30),
    STATE          VARCHAR2 (30),
    ZIP          VARCHAR2 (10),
    COUNTRY VARCHAR2 (40),
    PHONE VARCHAR2 (15),
    DATE_CREATED DATE NOT NULL,
    CONSTRAINT CONSUMER_PK
    PRIMARY KEY ( EMAIL ) ) ;
    CREATE TABLE CONSUMER_RCV (
    ID                VARCHAR2 (40) NOT NULL,-- PK
    EMAIL VARCHAR2 (100) NOT NULL,-- FK reference to Consumer
    SITE VARCHAR2 (100) NOT NULL, -- default website
    RECEIVE_EMAIL VARCHAR2 (1),
    CREATE_DATE DATE NOT NULL,
    CONSTRAINT CONSUMER_RCV_PK
    PRIMARY KEY (ID) ) ;
    ALTER TABLE CONSUMER_RCV ADD CONSTRAINT CONSUMER_RCV_FK
    FOREIGN KEY (EMAIL)
    REFERENCES CONSUMER (EMAIL) ;
    CREATE TABLE CONSUMER_ATTR (
    CONSUMER_ATTR_ID           VARCHAR2 (40) NOT NULL, -- PK
    ID                     VARCHAR2 (40) NOT NULL, -- FK reference to COnsumer_RCV
    ATTR_TYPE           VARCHAR2 (100) NOT NULL,
    ATTR_VALUE           VARCHAR2 (4000) NOT NULL,
    CONSTRAINT CONSUMER_ATTR_PK
    PRIMARY KEY ( CONSUMER_ATTR_ID ) ) ;
    ALTER TABLE CONSUMER_ATTR ADD CONSTRAINT CONSUMER_ATTR_FK
    FOREIGN KEY (CONSUMER_ATTR_ID)
    REFERENCES CONSUMER_RCV (ID) ;

    HI Hema,
      How are the entries related.. is it like for one entry in y table there are more than one entry in x table then you have to use loop with in loop , here are the both the conditions.
    1) For each entry in Y there are more than one entries in X
      sort y by quota trpid.
      sort x by quota trpid.
      loop at y.
      loop at x where quota eq y-quota
                            and trpid eq y-trpid.
      z-value = x-value.
      append z.
      endloop.
      endloop.
    2) For each y there is one entry in x table.
    sort y by quota trpid.
      sort x by quota trpid.
      loop at y.
      read table x with key quota = y-quota
                                trpid = y-trpid binary search.
    if sy-subrc eq 0.
      z-value = x-value.
      append z.
    Endif.
      endloop.
    Mahesh

  • Loading data from one table to another using cursor

    Hi,
    I have given the below command to load the data from 1 table to another using cursor.
    declare
    cursor mycursor IS
    SELECT extract_name,from_date,to_date,BETA from temp_table where EXTRACT_NAME='GIFTCARD_DETAILS';
    Begin
    for mycursor_1 IN mycursor loop
    insert into tmp_tab columns(col1,col2,col3,col5) values(mycursor_1.EXTRACT_NAME,mycursor_1.from_date,mycursor_1.to_date,mycursor_1.BETA);
    End loop;
    commit;
    end;
    It is working fine.
    But I want to hard code some of the columns ( like flags ) which are not there in 1st table and load them into 2nd table.
    In db2 we will give commands like
    varSqlStatus=`db2 "declare mycurs cursor for select extract_name,from_date,to_date,BETA,'N','Y' from temp_table"`
    varSqlStatus=`db2 "load from mycurs of cursor modified by identityignore insert into tmp_tab(col1,col2,col3,col5,col6,col7) nonrecoverable"`
    But I want it in oracle 10g, Can any one help me in this.

    Have you tried either of the two options :
    1. Modify the CURSOR itself :
    cursor mycursor IS
    SELECT extract_name,from_date,to_date,BETA,'N','Y' from temp_table where EXTRACT_NAME='GIFTCARD_DETAILS';2. Modify the INSERT statement itself :
    insert into tmp_tab columns(col1,col2,col3,col5,col6,col7) values(mycursor_1.EXTRACT_NAME,mycursor_1.from_date,mycursor_1.to_date,mycursor_1.BETA,'N','Y');

  • Load Data from a table on one server's database, to the same table structure in multiple server databases

    Hi,
    I have a situation where i have to load data from one server/database table to multiple servers/databases.
    Example:
    I need to load data from dbo.TABLE_A  (on Server: Server_A & Database: Database_A)  to the same table on the list of server databases like
    Server: Server_B , Database: Database_B
    Server: Server_C , Database: Database_C
    Server: Server_D , Database: Database_D
    Server: Server_E , Database: Database_E
    Server: Server_F , Database: Database_F
    Server: Server_G , Database: Database_G
    Server: Server_H , Database: Database_H
    so on and so forth on 250 such server database combinations.
    The table structure is the same on all the servers.
    If i make the source or destination dynamic, it throws an error while mapping ?
    I cannot get Linked server permissions and SQL Server Config thing doesn't work as well.
    Please suggest on how to load data from one source to multiple server/databases.
    Thank you.

    I just need to transfer one table's data. its like i have to use a query to pick data for
    the most recent data. So i use something like, select A, B, C, D from dbo.table where ETL_TIMESTAMP > (the max(etltimestamp) in the destination on different server). There are no foreign key relationships and the data should not be truncated. it just had
    to append the new records.

  • How to load data from oracle table to XML using ODI ?

    Hello Team
    I am trying to load data from an oracle table to an xml file. I have configured the physical and the logical schemas for the same. I have used SQL to SQL as LKM and SQL to SQL Append as IKM with Sunopsis Memory Engine as staging area.
    After this, when I am executing the interface, it is executed without any errors but to my surprise I am not finding the relevant data in the xml file. What could be the reason ?
    Please look into this and lemme know how to solve it.
    Thanks.

    908458 wrote:
    Hello Phanikanth
    Even IKM SQL Control Append is not solving the problem. There are many " order columns" in the target xml table. I have not mapped them or specified any order. Does the problem persist because of this ?
    Thanks
    Manoj
    Ocle to XML file loading issue in ODI 10.1.3.5

  • Error Occures while loading data from Source system to Target ODS

    Hi..
    I started loading Records From source system to target ODS.while i running the job i got the following errors.
    Record 18211 :ERROR IN HOLIDAY_GET 20011114 00000000
    Record 18212 :ERROR IN HOLIDAY_GET 20011114 00000000
    sp Please help me in these following Errors..
    Thanks in advance,

    Hello
    How r u ?
    I think this problem is at the ODS level, ZCAM_O04 is ur ODS Name.
    Could u check the ODS Settings, and the Unique Data Records is Checked or Not ?
    Best Regards....
    Sankar Kumar
    +91 98403 47141

  • Loading data from oracle table to text file........

    how can i load data from a oracle table to a text file or CSV file using PL/SQL procedures where the pls/sql code will take the table name dynamically.........
    soumen

    Try this thread..
    Is it possible to export a pl/sql region as a csv file?

  • Load data from one table to another

    Hi all,
    Please help me for my below requirement.
    Oracle version : Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    Rules
    1) First two city's should be loaded in city_1 and city_2.
    2) If there are more two cities, only first two should be loaded.
    3) If only one city_1 has value, it should be loaded in city_1.
    drop table seven_cities;
    create table seven_cities
    (id     number,
    city_1  varchar2(100),
    city_2  varchar2(100),
    city_3  varchar2(100),
    city_4  varchar2(100),
    city_5  varchar2(100),
    city_6  varchar2(100),
    city_7  varchar2(100)
    insert into seven_cities(id,city_1,city_2,city_3,city_4,city_5,city_6,city_7)
    values (1,'New York',null,null,null,'Chicago',null,null);
    insert into seven_cities(id,city_1,city_2,city_3,city_4,city_5,city_6,city_7)
    values (2,null,'Hyderabad','Delhi','Mumbai',null,null,null);
    insert into seven_cities(id,city_1,city_2,city_3,city_4,city_5,city_6,city_7)
    values (3,null,null,null,null,null,null,'London'); 
    insert into seven_cities(id,city_1,city_2,city_3,city_4,city_5,city_6,city_7)
    values (4,null,null,null,'Sydeny','Melbourne','Paris','Berlin');
    commit;
    select * from seven_cities;
    drop table two_cities;
    create table two_cities
    (id number,
    city_1  varchar2(100),
    city_2  varchar2(100));
    Expected data to be loaded
    id       city_1          city_2
    1     New York             Chicago
    2     Hyderabad             Delhi
    3     London          null
    4     Sydney          MelbourneThanks
    Raghu

    select  id,
            coalesce(city_1,city_2,city_3,city_4,city_5,city_6,city_7) city_1,
            nvl2(
                 city_1,
                 coalesce(city_2,city_3,city_4,city_5,city_6,city_7),
                 nvl2(
                      city_2,
                      coalesce(city_3,city_4,city_5,city_6,city_7),
                      nvl2(
                           city_3,
                           coalesce(city_4,city_5,city_6,city_7),
                           nvl2(
                                city_4,
                                coalesce(city_5,city_6,city_7),
                                nvl2(
                                     city_5,
                                     coalesce(city_6,city_7),
                                     nvl2(
                                          city_6,
                                          city_7,
                                          null
                ) city_2
      from  seven_cities
    ID CITY_1     CITY_2
      1 New York   Chicago
      2 Hyderabad  Delhi
      3 London
      4 Sydeny     Melbourne
    SQL>  SY.

  • Loading data from a table to another

    This question is continuation of my earlier thread
    Re: query help
    The last thread was answered by experts and was closed. But I have another problem, I'll put the whole scenario here:
    I have a table with data as
    id          status_code  emp_id
    1           a                10
    2           b                10
    3           a                20
    4           c                30
    5           k                10
    6           k                10
    7           a                10
    8           a                20
    9           z                20
    10           k                30
    11           k                30
    12           m                20
    13           k                10
    14           k                30and scripts are:
    CREATE TABLE TEST
    (id NUMBER,
    status_code VARCHAR2(5),
    emp_id NUMBER
    INSERT INTO test VALUES (1,'a',10);
    INSERT INTO test VALUES (2,'b',10);
    INSERT INTO test VALUES (3,'a',20);
    INSERT INTO test VALUES (4,'c',30);
    INSERT INTO test VALUES (5,'k',10);
    INSERT INTO test VALUES (6,'k',10);
    INSERT INTO test VALUES (7,'a',10);
    INSERT INTO test VALUES (8,'a',20);
    INSERT INTO test VALUES (9,'z',20);
    INSERT INTO test VALUES (10,'k',30);
    INSERT INTO test VALUES (11,'k',30);
    INSERT INTO test VALUES (12,'m',20);
    INSERT INTO test VALUES (13,'k',10);
    INSERT INTO test VALUES (14,'k',30);Here's the query that experts gave me in last thread, to fetch desired records:
    The requirement was to fetch records of those emp ids where a given emp_id consectively gets same status code.
    Each emp id gets a status code and at times it gets same status code as its previous status code. And I am interested in such scenarios.
    For example,
    emp_id=20 gets status_code=a in id=3 and its next status_code is also =a at id=8,
    emp_id=10 gets status_code=k in id=5 and gets same status_code again in id=6,
    emp_id=30 gets status_code=k in id=10 and gets same status code in id=11 and id=14.
    And the answer was:
    select *
    from
    select
      id,
      status_code,
      emp_id,
      lag(status_code) over (partition by emp_id order by id asc) as last_status,
      lead(status_code) over (partition by emp_id order by id asc) as next_status 
    from test
    where status_code = last_status
    or status_code = next_status
      / But now the new issue is that the records of the table TEST are to be loaded into another table TEST_REVISED . For each ID of table TEST, there will be one or more records in table TEST_REVISED.
    ALTER TABLE TEST ADD (CONSTRAINT id_pk  PRIMARY KEY(id));
    CREATE TABLE TEST_REVISED
    (TR_ID NUMBER PRIMARY KEY,
    ID     NUMBER REFERENCES TEST(ID),
    NEW_STATUS_CODE VARCHAR2(5)
    );This is what I want to see in table TEST_REVISED
    TR_ID,     ID,        NEW_STATUS_CODE
    100,        1,          'test-code'
    200,        2,'         'test-code'
    300,        3,         'test-code'
    400,        4,          'test-code'
    500,        5,          'test-code'
    600,        5,           'test-code'--notice here: EMP_ID=10 had same status consecutively in table TEST, so when that record is loaded to TEST_REVISED, ID=5 is used                instead of  id=6
    700,        7,          'test-code'
    800,        3,           'test-code'--notice here: EMP_ID=20 had same status  consecutively in table TEST, so when that record is loaded to TEST_REVISED, ID=3 is used  instead of id=8
    900,        9,           'test-code'
    1000,      10,         'test-code'
    1100,      10,           'test-code'--notice here: EMP_D=30 had same status  consecutively in table TEST, so when that record is loaded to TEST_REVISED, ID=10 is used  instead of id=11
    1200,      12,             'test-code'
    1300,      13,             'test-code'
    1400,      10,             'test-code'--notice here: EMP_ID=30 had same status  consecutively in table TEST, so when that record is loaded to TEST_REVISED, ID=10 is used  instead of id=14 or id=11Ignore the value of the column NEW_STATUS_CODE here.
    How can I load data in table TEST_REVISED from table TEST keeping in view the requirement I mentioned? Table TEST has around 1 million records.
    Once this achieved, I want to delete records from table TEST with following ids :
    ID=6,8,11,14.
    Thanks a lot!
    Edited by: user5406804 on Dec 5, 2010 5:49 PM
    Edited by: user5406804 on Dec 5, 2010 5:50 PM

    OK, i still don't see how this is all supposed to fit together.
    You haven't said it, but i'm assuming when you have a series like
    id   emp status_code
    1    30   k
    2    30   k
    3    10   a
    4    30  k
    5    30  kYou actually want the output to be
    id   emp status_code   new_id
    1    30   k                   1
    2    30   k                   1
    3    10   a                   3
    4    30  k                    4
    5    30  k                    4Which presents a bit of a problem using simply analytic functions.
    So here's the modified query that picks up just the rows you want 'changed'.
    TUBBY_TUBBZ?
    select
      id,
      emp_id,
      status_code,
      connect_by_root(id) as new_id
    from
      select
        id,
        emp_id,
        status_code,
        lag(status_code)  over (partition by emp_id, status_code order by id asc) as last_status,
        row_number()      over (partition by emp_id, status_code order by id asc) as rn
      from
        select
          id,
          emp_id,
          status_code,
          lead(status_code) over (partition by emp_id order by id asc) as next_code,
          lag(status_code) over (partition by emp_id order by id asc) as last_code,
          row_number() over (partition by emp_id order by id asc) as rn
        from test
      where status_code in (last_code, next_code)
    start with last_status is null
    connect by prior emp_id = emp_id
    and prior status_code = status_code
    and prior rn = rn - 1
         ID     EMP_ID STATU     NEW_ID
          5        10 k           5
          6        10 k           5
          3        20 a           3
          8        20 a           3
         10        30 k          10
         11        30 k          10
         14        30 k          10
    7 rows selected.
    TUBBY_TUBBZ?You say you have a lot of rows in the TEST table, and i'm hoping and praying this is a one time requirement and not an on-going process that needs to occur so your best bet (performance wise) would probably be to use the above query to create a temporary table.
    Use that temporary table to control the rest of the process (inserting into TEMP_REVISED and deleting from TEST).
    That's the best i can think of based on what i believe your requirement is ... and i honestly don't think that's going to perform overly well (the connect by functionality specifically).

  • Loading Data from multiple tables into essbase using ODI

    Hi,
    We have a scenario where data comes from multiple tables. I would like to know how will ODI load this data for the right combination of the members

    Hi,
    I take it each data table has a field which maps to the other table. You can just drag the datastores on to the source interface and create a join between the tables.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Load data from Oracle table,CSV to Hyperion Essbase

    Hi All,
    when i am executing interface(load data into hyperion essbase from oracle table and csv files),
    I am getting below error.
    com.sunopsis.tools.core.exception.SnpsSimpleMessageException: Error during task interpretation
    Task:1
    java.lang.Exception: BeanShell script error: Sourced file: inline evaluation of: ``out.print("drop table TEMP_BIAPPS.A3$") ; out.print(thread) ; out.print("_0Combi . . . '' : Undefined argument: thread : at Line: 2 : in file: inline evaluation of: ``out.print("drop table TEMP_BIAPPS.A3$") ; out.print(thread) ; out.print("_0Combi . . . '' : ( thread )
    BSF info: Drop work table at line: 0 column: columnNo
         at com.sunopsis.dwg.codeinterpretor.a.a(a.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.k(e.java)
         at com.sunopsis.dwg.cmd.g.A(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    Text:drop table TEMP_BIAPPS.A3$<?=thread?>_0Combination1 A
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.k(e.java)
         at com.sunopsis.dwg.cmd.g.A(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    Can any one help me out?
    Edited by: 791206 on Nov 17, 2010 11:16 PM
    Edited by: maulik vadodariya on Nov 17, 2010 11:16 PM
    Edited by: maulik vadodariya on Nov 17, 2010 11:17 PM
    帖子经 791206编辑过

    Hi All,
    It was staging area problem.
    So,I created new schema(User/Password in Oracle Database),and give staging area to that newly created schema(Defination Tab of Interface).
    Also,in Flow tab,I selected LKM File to SQL. and problem resolved.
    Thanks,
    Maulik G. Vadodariya
    Edited by: Maulik Vadodariya on 22 Nov, 2010 2:36 PM

Maybe you are looking for

  • How to update a Date attribute type?

    Hello! I have several Date attributes in some categories that I need to update with the Oracle Content API. I saw that OCDB returns a GregorianCalendar object to retrieve the date value, but I can't update it with the same object, I used this java co

  • Multi-monitor viewing

    Suggestions or comments for viewing multiple pages horizontally across multiple monitors? Would like to setup 2-3, maybe four pages horizontally.

  • Blurry Menubuilder Text

    Hi, I'm creating a menubuilder project to link several different movies together. When I preview the menu, the text and tootips are clear. Once I export the project however, the text appears blurry and most unprofessional. It doesn't matter whether I

  • Photos Gone - Can Thumbnails be Salvaged

    I accidentally deleted approx. 2000 photos and 50 movies that were in iPhoto but was done outside of iPhoto (and yes, I realize that was a huge mistake). I have tried to recover them using some photo recovery software, but had very little success. It

  • How to migrate to SSIS 2012 from Integration Services dtsx file?

    I am struck at migrating the dtsx file to SSIS 2012. How to migrate that dtsx file to SSIS 2012.I made it to migrate from SQL2000 to SQL 2005 dtsx. Now I want to migrate or upgrade it to SSIS 2012.How to achieve it.Help me please.  sammy