Use of Sequence in Match-Merge

Dear All,
I have a source table containing name and address data. I want to do householding, which means I need to split the data using a match-merge operator. The address data is the merged output, and the name data is the cross-reference output. All well and good so far.
I want eventually to load the outputs into two levels of a Customer dimension (although for testing right now, I'm just using two ordinary target tables). I know that I will need a 'business key' to link the merged and the cross-reference outputs (as the two dimensional levels). I decide that I shall create a column in both outputs called HH_SEQ, and load this Household Sequence number from a Sequence (which I prepared earlier).
In Merge Rules, for the Attribute HH_SEQ, I use a Rule Type of Sequence, and select the appropriate Sequence from the drop-down list box. I map this attribute in the MERGE outgroup to the appropriate column in the target merged table, and MM_HH_SEQ in the XREF outgroup to the appropriate column in the target cross-reference table.
Here is the issue: to get HH_SEQ to be available as a potential Output Attribute in either Merge Output or Cross-Reference Output, it must first be present as a Source Attribute. Which means I had to add it to Input Attributes first. But of course it is not on my input source table! And thus I get a "VLD-1000 Input parameter INGRP1.HH_SEQ does not have input" warning.
Either I'm just not understanding how to use the Sequence rule type properly (the documentation is pretty atrocious, mind), or there is some technique required here that is just not apparent from several days of experimentation.
All help gratefully received!
Regards,
Donna
p.s. it does actually compile and run just fine!

Hi Donna
I think you are using it in the correct way! I've seen other examples like this from the MM creators.
The warning can be ignored, I think it is there to highlight a potential issue if it was being used for a scenario other than what you are doing.
Cheers
David

Similar Messages

  • HOW TO USE a sequence in merge load

    Hi,
    Someone can help me with a solution for loading a table with merge option and one of the column has values from a sequence.
    regards
    Babu

    Can we use a sequence to load a table with IKM Oracle Incremental Update (MERGE)?

  • Using the match/merge operator

    Hi guys,
    I have created a simple table with 4 columns:
    EMPLOYEES
    - employee_id
    - emp_firstname
    - emp_lastname
    - emp_telephone
    I have placed 5 entries in the table:
    11, jane, doe, 80980980
    12, william, gates,6876876868
    13, john, anderson, 545646546
    14, michelle, millo, 340580334
    15, john, anderson, 545646546
    Row 13 and 15 are duplicates, except for the employee_id. I'm trying to use the match-merge operator to check for matches on emp_firstname, emp_lastname and emp_telephone. I would like to merge the rows matching on firstname, lastname and telephone number, and would like to keep the lowest employee_id as PK.
    I have tried to use the match-merge operator with the following settings;
    Input connections:
    - employee_id
    - emp_firstname
    - emp_lastname
    - emp_telephone
    Merge output
    - employee_id
    - emp_firstname
    - emp_lastname
    - emp_telephone
    Xref output
    none
    Match bins:
    - emp_firstname
    - emp_lastname
    - emp_telephone
    Match rules:
    MA_0, all_match
    Merge rules:
    emp_firstname: all match
    emp_lastname: all match
    emp_telephone: all match
    When I debug the match merge operator I get " 4 in, 4 out", but I expected to have "5 in, 4 out". Am I using this match/merge operator the right way?
    thx for you help!
    michiel
    null

    Hi Robert,
    I tried on 3 database installations (all 10.2). there is no parameter DB_BLOCK_BUFFERS set. And i do not assume that there is a reasn for increasing the db_cache_size - means: why i did not get any error for that presumed case?
    btw: can you explain why i should increase db_cache_size?
    thanks,
    Andreas

  • 10GR2 - Match Merge - How can I Rank a list of values?

    Hi
    I am trying to use 10GR2 to take a set of multiple records and merge them into a single record. e.g.
    ID Value
    1 val1
    1 val2
    etc
    I want to merge these into one record and give val1 priority over val2 etc. So the output record for ID 1 will have a value = val1.
    I am trying to use a match-merge operator using rank, but am not sure how to use the Rank Rule Editor.
    Can anyone please help with how I format the expression to rank these values? Or if this is the correct way to do this in 10GR2?
    Thanks
    GB

    You can use this approach:
    http://www.oracle.com/technetwork/developer-tools/jdev/listbindingvalue-088449.html
    Or this:
    https://blogs.oracle.com/shay/entry/adding_lov_to_non_database

  • VLD-1800: Illegal use of sequence operator(s)

    I'm getting the following error.
    VLD-1800: Illegal use of sequence operator(s)
    ["ACCT_SEQ"] in a complex mapping.
    Does anyone know why this wuld be happening?
    Also, what constitutes a complex mapping?
    Any help is greatly appreciated.

    Hi John,
    Can you explain what your mapping is supposed to execute (merge statement with sequence, multi table insert with sequence, ...) ?
    Best Regards,
    Sébastien De Clercq,
    Brussels, Belgium

  • Pl/sql procedure for match-merge operator

    I have used the match-merge operator in OWB. I want to implement the same match-merge operation using a pl/sql procedure. Please help.

    Yes sure. Lets say, we have a table tab1, which has the following structure and data:
    First_name Last_name Address City
    JACK ANDREWS XYZ NY
    ANDREWS JACK NY
    Now, i want to write a procedure which matches and merges the above two records, into a single record.The matching is done with the help of the first_name and last_name columns.

  • Match Merge error after migrated to OWB 10.1.0.4

    My old mappings which were running fine are giving match merge errors after uograded from 10.1.0.2 to 10.1.0.4.
    getting following error while deploying into new repository (10.1.0.4).
    any suggestions please....
    ORA-06550: line 856, column 17:
    PLS-00103: Encountered the symbol "=" when expecting one of the following:
    ( - + case mod new not null others <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count current exists max min prior sql stddev sum variance
    execute forall merge time timestamp interval date
    <a string literal with character set specification>
    <a number> <a single-quoted SQL string> pipe
    The symbol "null was inserted before "=" to continue.
    Thanks
    Arvinda

    I did some more analysis. The error does not occur with new repositories, that are created with the Repos-Wizard after Software was upgraded to 10.2.0.2.
    However, it does occur with all repositories that were migrated from 10.2.0.1 to 10.2.0.2, using the upgrade script as described in the patch set's installation notes.
    The problem persists, even when the profiling user (i.e. schema) is removed, and a new one is initialised by the Design Client.

  • How to use parallel sequence for split the operation qty. urgent or other o

    PP guru
    My scenario is as follows.
    I ve one material suppose…xyz.
    For that material I' ve created bom, routing.
    In routing I' ve mention only one operation. 0010.
    Now I' ve the production order of 1000 kg.
    I want to use two work centers to run this production order. ( e.g.work center a and b)
    In routing I used work center a.
    In short I want split that operation.
    So what I ve to do or use parallel sequence and how???
    or else is there any other option to split the order to two or more machines/work center?
    Pls explain me in brief.
    Regards,
    Ram

    Hi,
      If you want to carry the production with two different work centers , first you need to split the operation qty.
    For this in the order type dependent parameters OPL8
    in the controlling tab page enable the indicator Cost collector
    and set the default rule as PP2.
      Create a Product cost collector with KKF6N.
       Now in the production order , select the operation and choose functions--->>> split.
       Now enter the operation split quantity and execute.
       Now in MD04 you can see two production order.
       In the second production order change the work center in the operation overview as desired and save.
      Regards,
    nandha

  • Use a sequence template multiple times in same project

    I have created a lower-third animated title and saved it as a sequence as it has sound. What I'm confused about it how I import that sequence and use it multiple times in the same project and change the content of the title for each sequence. If I import the sequence and change the title in one instance, it changes the title of all instances. I would like to use the sequence and be able to change each title. I have even tried copying sequences and renaming them but any editing still seems to affect the parent sequence file.
    I know this must be really simple but I'm going round in circles here. Any pointers appreciated.

    Take a look at this thread:
    style sheets for titles?
    I'm not sure if an AFX Live text will bring over the audio, it is not something I have tried.

  • Is there a way to enforce the use of sequences

    is there a way to stop someone from inserting an id without using the sequence?
    CREATE SEQUENCE id_seq
       START WITH 1;
    CREATE TABLE test_table (id_seq NUMBER (4) PRIMARY KEY);
    INSERT INTO test_table
         VALUES (id_seq.NEXTVAL);
    INSERT INTO test_table
         VALUES (2);
    INSERT INTO test_table
         VALUES (id_seq.NEXTVAL);gives us
    ORA-00001: unique constraint (DSAMSTRC.SYS_C0091648) violated
    as it should
    however is there a check constraint of some ilk that ensures that the user is using the sequence when doing inserts?
    so that the second insert
    INSERT INTO test_table
         VALUES (2);gives me some sort of check constraint violation that I'm not using the id_seq.NEXTVAL ?

    Justin:
    One minor problem with your trigger. If the "bad" insert is the first thing done in the session you get:
    SQL> insert into test_table values(25);
    insert into test_table values(25)
    ERROR at line 1:
    ORA-08002: sequence ID_SEQ.CURRVAL is not yet defined in this session
    ORA-06512: at "OPS$ORACLE.TRG_TEST_TABLE", line 4
    ORA-04088: error during execution of trigger 'OPS$ORACLE.TRG_TEST_TABLE'If you want to raise an exception instead of just silently using the sequence as Frank suggests you need something more like:
    create trigger trg_test_table
       before insert on test_table
       for each row
    declare
       l_currval integer;
       no_currval exception;
       PRAGMA EXCEPTION_INIT (no_currval, -8002);
    begin
       select id_seq.currval
       into l_currval
       from dual;
       if( l_currval != :new.id_seq ) then
          raise_application_error( -20001, 'Hey!  Use the sequence' );
       end if;
    exception
       when no_currval then
          raise_application_error( -20001, 'Hey!  Use the sequence' );
    end;John

  • Using Database Sequence in Interface with Union

    Hi Gurus,
    I have Oracle 11gR2 database as my Source and Target.
    When I try to use Database Sequence along with an Interface having set operator like Union , I am getting the following error:
    ODI-1227: Task eSIS_Student_U1_Fact (Export) fails on the source ORACLE connection ESISDW.
    Caused By: java.sql.SQLSyntaxErrorException: ORA-02287: sequence number not allowed here
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:947)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1283)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1441)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3769)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3823)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1671)
         at oracle.odi.query.JDBCTemplate.executeQuery(JDBCTemplate.java:189)
         at oracle.odi.runtime.agent.execution.sql.SQLDataProvider.readData(SQLDataProvider.java:89)
         at oracle.odi.runtime.agent.execution.sql.SQLDataProvider.readData(SQLDataProvider.java:1)
         at oracle.odi.runtime.agent.execution.DataMovementTaskExecutionHandler.handleTask(DataMovementTaskExecutionHandler.java:70)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
         at java.lang.Thread.run(Thread.java:662)
    Is there any work around to use Database Sequence along with the Interface?
    Regards,
    Sai.

    Hi Arv,
    Thanks for the reply. I tried that also, but still no luck.
    Regards,
    Sai.

  • Using a sequence inside BEFORE TRIGGER

    Hi all,
    I just created a testtable and a sequence to use as a primary key column value for that table.
    I tried to create a BEFORE INSERT trigger on that table and in the trigger i tried to set up the primary key column value using the sequence
    but while compiling i am getting the error "Error(9,30): PLS-00357: Table,View Or Sequence reference 'SEQ_OF_TESTTABLE.NEXTVAL' not allowed in this context"
    My Version:Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    All the objects created with the same user. I would appraciate any help, thanks all
    EDIT
    I solved the problem using the below
    create or replace
    TRIGGER Bef_Ins_On_Testtable
    BEFORE INSERT ON TestTable
    FOR EACH ROW
    declare
    ntemp_id INT;
    BEGIN
    SELECT SEQ_OF_TESTTABLE.NEXTVAL INTO ntemp_id FROM DUAL ;
    DBMS_OUTPUT.PUT_LINE('İNSERTED');
    :NEW.VSURNAME := 'HAKKİ' ;
    :NEW.NID := ntemp_id;
    END;But i wonder why i can use the sequence(just as seqeunce_name.NEXTVAL) in INSERT statement and why cant in trigger?
    Edited by: user9371286 on 31.Tem.2010 04:15
    Edited by: user9371286 on 31.Tem.2010 04:21
    Edited by: user9371286 on 31.Tem.2010 04:27

    Please post your trigger code and your database version ( the result of: select * from v$version; ).
    Put it between tags, so your example will stay formatted.
    (see: http://forums.oracle.com/forums/help.jspa for more examples regarding tags)
    "PLS-00357: Table,View Or Sequence reference "string" not allowed in this context
        Cause: A reference to database table, view, or sequence was found in an inappropriate context. Such references can appear only in SQL statements or (excluding sequences) in %TYPE and %ROWTYPE declarations. Some valid examples follow: SELECT ename, emp.deptno, dname INTO my_ename, my_deptno, my_dept .FROM emp, dept WHERE emp.deptno = dept.deptno; DECLARE last_name emp.ename%TYPE; dept_rec dept%ROWTYPE;
        Action: Remove or relocate the illegal reference."
    +http://download.oracle.com/docs/cd/B19306_01/server.102/b14219/plsus.htm#sthref13592+
    You can find examples of triggers referring to sequences here, by doing a search on this forum or:
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_triggers.htm#ABC1032282                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to use new sequence when one is reached its maxvalue in PL SQL code

    Hi,
    Currently, I am populating a unique product serial number in a table column using a sequence call to generate new number. For different products, I have different sequences and in my PL SQL code usiing IF..Else block I populate serial number for different products. For one most selling product sequence, we are reaching a Max value in production in a month and to make sure that application will continue to work fine for various end users without getting any error on their screens, I want my code to switch to new sequence automatically. I just need to add another if condition but my problem is how to find accurately when max value is reached for old sequence.
    As call to old sequence can happen in different sessions there could be inconsistency and can end up at error. My new sequence value has to start with AV1000. Please suggest.
    My old sequence look like this :
    SEQUENCE Prd
    INCREMENT BY 1
    START WITH AS1000
    MAXVALUE AS9999
    MINVALUE AS1000
    CYCLE NOCYCLE
    CACHE 2
    Order Yes;
    Edited by: user11695088 on Jul 15, 2009 12:14 AM

    Catch the exception and use your new sequence. But somehow, I'm not liking your alternative approach.
    SQL> set line 300
    SQL> set pages 50000
    SQL> set serveroutput on
    SQL> create sequence testing_seq increment by 1 start with 1 maxvalue 3
      2  /
    Sequence created.
    SQL>
    SQL> create or replace procedure test_seq_proc(p_seq out number)
      2  is
      3  begin
      4     select testing_seq.nextval
      5     into p_seq
      6     from dual;
      7  --
      8     dbms_output.put_line(p_seq);
      9  --
    10  end;
    11  /
    Procedure created.
    SQL> declare v_out number;
      2  begin
      3     test_seq_proc(v_out);
      4  end;
      5  /
    1
    PL/SQL procedure successfully completed.
    SQL> /
    2
    PL/SQL procedure successfully completed.
    SQL> /
    3
    PL/SQL procedure successfully completed.
    SQL> /
    declare v_out number;
    ERROR at line 1:
    ORA-08004: sequence TESTING_SEQ.NEXTVAL exceeds MAXVALUE and cannot be instantiated
    ORA-06512: at "ETL_ADMIN.TEST_SEQ_PROC", line 4
    ORA-06512: at line 3
    SQL>Cheers
    Sarma.

  • Using oracle sequence in SQL Loader

    I'm using oracle sequence in control file of sql loader to load data from .csv file.
    Controlfile:
    LOAD DATA APPEND
    INTO TABLE PHONE_LIST
    FIELDS TERMINATED BY "," TRAILING NULLCOLS
    PHONE_LIST_ID "seqId.NEXTVAL",
    COUNTRY_CODE CHAR,
    CITY_CODE CHAR,
    BEGIN_RANGE CHAR,
    END_RANGE CHAR ,
    BLOCKED_FREE_FLAG CHAR
    Datafile:
    1516,8,9,9,B
    1517,1,1,2,B
    1518,8,9,9,B
    1519,8,9,9,B
    1520,8,9,9,B
    1521,8,9,9,B
    1) As first column uses oracle sequence, we have not defined that in datafile.
    This gives me error "Can not insert NULL value for last column"
    Is it mandatory to specify first column in datafile, even though we are using sequence?
    2) Another table is referencing PHONE_LIST_ID column (the one for which we using sequence) of this table as a foreign key.
    So is it possible to insert this column values in other table simultaneously? Sequence no. should be same as it is in first table...
    Kindly reply this on urgent basis....

    use BEFORE INSERT trigger
    with
    select your_seq.nextval into :new.id from dual;

  • Skipping merge  in match /merge step in the workflow

    Dear all,
    Accepting new imported records in a workflow. One step is looking for identicals in a match/merge step. The user has to accept or skip records depending on the matching results. Manual step to be performed always.
    We are looking for a solution the manual step is skipped in case no matches are found. fi. the matching result is 10 low. The next step in the flow has to start now.
    What process or process step has to be performed?
    Thanks in advance
    Harrie

    Antonise,
    The match/merge step is manual because In real time scenarios 'The person who have access to add records in Data Manager not necessarily can have access to approve or disapprove the new added records', so the case become one client say add records in Data Manager and the approval/disapproval, match/merge etc. steps will be performed by Admin or say DBO.
    Thats why match/merge step have manual execution.
    And your qyery if no match found then its should be automatic to next step "No because Admin still can refuse those new added records untill and unless he/she is not satisfied"
    Rewards if helpful.
    BR,
    Alok

Maybe you are looking for

  • JNLP version problem

    Hi, I've added a version id for each resource in my JNLP file <jar href="/MinFinCtx/WSTest/jars/ctx.be.jar" version="1"/> <jar href="/MinFinCtx/WSTest/jars/ctx.com.jar" version="1"/> When I try to lauch my application I receive the following error me

  • Grey out(disable) a row in ALV grid

    Hi, I want to know how to grey out(disable) row wise in ALV grid display. i..e.. Few rows in ALV grid display shoud be editable and few rows non editable based on certain condition. How do we do that....Please help. Thanks in advance.

  • How do I turn off automatic update ! ! !

    Someone please help. I need to know how to turn off automatic update..fast

  • Off-Hours Alerting on WLC/ISE

    Dear Community, On a corporate enviroment, we are using a WLC Model 5508 along with a Standalone ISE for Wirelless authentication. I was wondering if it is possible to set time-based alerting (via the WLC ??), in order to receive e-mail notification

  • Transfers and PO

    Hi All, I am very new to Oracle Retail but I am very eager to learn, I don't know whether I can ask this question here or not. I need to understand the Flow of Transfers and PO. I need to understand from the point when a user creates a PO in RMS till