Table comparisons

Hi,
We want to compare the tables between DEV and QA.
Can you please let me know as what is the quick process we need to follow to compare all the tables between DEV and QA.
Please help
Thanks

Hi Ram,
You can try either of the below methods:
1. Tcode SCMP - provide the table name and RFC connection and click on comparison button
2. Tcode SM31 - provide table name then display. From the Utilities menu select Comparison and provide the RFC connection.
3. Tcode SCU0 - Manual select then create, provide table name and RFC connection
Hope it helps!
Regards,
Nupur

Similar Messages

  • Erratic behaviour map operation after table comparison

    BODI XIR2 11.7.3.6
    We want to detect and store changes in source data and store these changes in the target table.
    After the table comparison the row has got an update operation code flag and goes to a Map operation that converts Update row types to Normal and discards all other row types.
    normal -> discard
    update -> normal
    insert -> discard
    delete -> discard
    The map operation behaviour is erratic: sometimes the update row is mapped to normal and sometimes the update is discarded.

    I would be surprised if that is the case. You could run the dataflow in debug mode, 'cause there you can see the data and the OPCode flag of insert/update/delete after the TC transform.

  • Table Comparisons and Deadlocks

    Post Author: Thang Nguyen
    CA Forum: Data Integration
    Hi ,
    Pretty new to this DI stuff, but I've got a dataflow where I'm using a Table Comparison Transform to work out my updates and inserts. My database is SQL server 2000.
    When it runs the Table Comparison I get SQL errors regarding deadlock victim and the insert fails. I've ran a trace on SQL Server and the insert statement is being blocked by a select statement, so looks like some sort of issue with the Table Comparison looking for the differences and inserting new rows at the same time.
    I've tried to split the operation into two Dataflows using Map Operation where one is doing the updates and the other does in the inserts, but I still get the deadlock issue.
    Has anyone else experienced this problem?
    Thanks
    Thang

    Post Author: Thang Nguyen
    CA Forum: Data Integration
    If anyone is interested the solution I've got from BO is:
    "Can you put the following parameter in  your DSConfig   / al_engine section  :  SQLServerReadUncommitted=1 "
    Beware that this sets your changes the SQL server Transaction Isolation level to allow dirty reads which isn't ideal

  • Using table comparison transform can you point to multiple tables as target

    Using table comparison transform can you point to multiple tables as target tables?
    Thank you very much for the helpful info.

    If you want to feed the output to multiple tables, you can do so, but you have to be cautious enough on which table to be used as a comparison table in this case. The comparison table provided inside Table Comparison will be compared against the input data set for generating opcodes (Insert / Update / Delete) to input rows.

  • Using table comparison can we use multiple tables as source?

    Using table comparison can we use multiple tables as source?
    Thank you very much for the helpful info.

    Table Comparison
    1) Input Data coming in
    2) Comparison table (table to which the data is compared)
    3) Output (input rows with respective opcodes based on the comparison result of input dataset with the comparison table)
    If your question is whether table comparison can accept union/join of multiple table sources, you can achieve by using merge/query transforms and then feeding to table comparison. Here, you have to be careful about choosing the primary keys inside table comparison

  • I HAVE A SOURCE TABLE WITH 10 RECORDS AND TARGET TABLE 15 RECORDS. MY WUESTION IS USING WITH THE TABLE COMPARISON TRANSFORM I WANT TO DELETE UNMATCHED RECORDS FROM THE TARGET TABLE ??

    I HAVE A SOURCE TABLE WITH 10 RECORDS AND TARGET TABLE 15 RECORDS. MY QUESTION IS USING WITH THE TABLE COMPARISON TRANSFORM .I WANT TO DELETE UNMATCHED RECORDS FROM THE TARGET TABLE ?? HOW IT IS ??

    Hi Kishore,
    First identify deleted records by selecting "Detect deleted rows from comparison table" feature in Table Comparison
    Then Use Map Operation with Input row type as "delete" and output row type as "delete" to delete records from target table.

  • COLLATE Error on Table Comparison

    Hi,
    We have just upgraded to from version 11.7.3 to version 12.2.2 and we are getting this error when running the table comparison transform with sorted input:
    "Expression type int is invalid for COLLATE clause. "
    I asked our DBA to see what BODS was passing through at it is sending this:
    WHERE ( "TCRdr_1"."VEHICLE_ID_NK"  >= @P1  COLLATE Latin1_General_BIN)
    Why is it using COLLATE, and more importantly is there anyway to control this?
    The database is SQL Server 2005.
    Thanks

    this issue is fixed in 12.2.3, there were some issues prior to 12.2.3 related to Access Violation in case of SQL Server 2008 as target table, for DATETIME and DATETIME2 datatypes in target table
    as you mentioned you are using SQL Server 2005, do you get the Access Violation in a particular case, is the issue consistently reproducible ? please file a support case for the Access Violation issue or give me a reproducible scenario so that I can file a bug for that
    if you don't want to apply the 12.2.3 then you will see this issue for all table compare with sorted input and key columns with datatype other than CHAR, VARCHAR or NCHAR or NVARCHAR

  • Table Comparison Performance

    Anyone has experience with using table comparison transforming for large volume data, e.g. 10M records.
    How is the performance?
    Any experience and suggestions is welcome.

    Performance will depend on a lot of factors, but the two big ones are:
    1. how many columns you are using in your compare (more columns will be slower)
    2. how you do the compare (sorted input is WAY faster than row comparison)
    Without knowing any details about your data or the process you are trying to implement it's difficult to make any additional recommendations.  But keep in mind that there are other options - especially for really big data sets.
    For example, you can always use a two step process that first deletes existing records matching the incoming set of primary keys, and then do a straight insert of the rows.   This will avoid the whole comparison step - and avoid doing updates which are much slower than inserts.
    However, this only works if you are replacing the existing records.  It wouldn't work if your table compare is part of a type 2 dimension load or something that requires you to track history.

  • Schema Table Comparison

    Hi All,
    I've got 2 schemas with identical tables.
    I want to do a minus on the tables but would like to do this with a procedure that then reports the change into a <table_name>_diff table for each - This table should show records that are in schema1 but not in 2 and records that are in schema 2 but not in 1.
    There are about 40 tables in total so a proc rather than doing it all manually would be superb...
    Any ideas ?

    Hi ,
    I have found somewhere in the net the following code......
    REM
    REM Edit the following three DEFINE statements to customize this script
    REM to suit your needs.
    REM
    REM Tables to be compared:
    DEFINE table_criteria = "table_name = table_name" -- all tables
    REM DEFINE table_criteria = "table_name != 'TEST'"
    REM DEFINE table_criteria = "table_name LIKE 'LOOKUP%' OR table_name LIKE 'C%'"
    REM Columns to be compared:
    DEFINE column_criteria = "column_name = column_name" -- all columns
    REM DEFINE column_criteria = "column_name NOT IN ('CREATED', 'MODIFIED')"
    REM DEFINE column_criteria = "column_name NOT LIKE '%_ID'"
    REM Database link to be used to access the remote schema:
    DEFINE dblink = "remote_db"
    SET SERVEROUTPUT ON SIZE 1000000
    SET VERIFY OFF
    DECLARE
      CURSOR c_tables IS
        SELECT   table_name
        FROM     user_tables
        WHERE    &table_criteria
        ORDER BY table_name;
      CURSOR c_columns (cp_table_name IN VARCHAR2) IS
        SELECT   column_name, data_type
        FROM     user_tab_columns
        WHERE    table_name = cp_table_name
        AND      &column_criteria
        ORDER BY column_id;
      TYPE t_char80array IS TABLE OF VARCHAR2(80) INDEX BY BINARY_INTEGER;
      v_column_list     VARCHAR2(32767);
      v_total_columns   INTEGER;
      v_skipped_columns INTEGER;
      v_count1          INTEGER;
      v_count2          INTEGER;
      v_rows_fetched    INTEGER;
      v_column_pieces   t_char80array;
      v_piece_count     INTEGER;
      v_pos             INTEGER;
      v_length          INTEGER;
      v_next_break      INTEGER;
      v_same_count      INTEGER := 0;
      v_diff_count      INTEGER := 0;
      v_error_count     INTEGER := 0;
      v_warning_count   INTEGER := 0;
      -- Use dbms_sql instead of native dynamic SQL so that Oracle 7 and Oracle 8
      -- folks can use this script.
      v_cursor          INTEGER := dbms_sql.open_cursor;
    BEGIN
      -- Iterate through all tables in the local database that match the
      -- specified table criteria.
      FOR r1 IN c_tables LOOP
        -- Build a list of columns that we will compare (those columns
        -- that match the specified column criteria). We will skip columns
        -- that are of a data type not supported (LOBs and LONGs).
        v_column_list := NULL;
        v_total_columns := 0;
        v_skipped_columns := 0;
        FOR r2 IN c_columns (r1.table_name) LOOP
          v_total_columns := v_total_columns + 1;
          IF r2.data_type IN ('BLOB', 'CLOB', 'NCLOB', 'LONG', 'LONG RAW') THEN
            -- The column's data type is one not supported by this script (a LOB
            -- or a LONG). We'll enclose the column name in comment delimiters in
            -- the column list so that the column is not used in the query.
            v_skipped_columns := v_skipped_columns + 1;
            IF v_column_list LIKE '%,' THEN
              v_column_list := RTRIM (v_column_list, ',') ||
                               ' /*, "' || r2.column_name || '" */,';
            ELSE
              v_column_list := v_column_list || ' /* "' || r2.column_name ||'" */ ';
            END IF;
          ELSE
            -- The column's data type is supported by this script. Add the column
            -- name to the column list for use in the data comparison query.
            v_column_list := v_column_list || '"' || r2.column_name || '",';
          END IF;
        END LOOP;
        -- Compare the data in this table only if it contains at least one column
        -- whose data type is supported by this script.
        IF v_total_columns > v_skipped_columns THEN
          -- Trim off the last comma from the column list.
          v_column_list := RTRIM (v_column_list, ',');
          BEGIN
            -- Get a count of rows in the local table missing from the remote table.
            dbms_sql.parse
            v_cursor,
            'SELECT COUNT(*) FROM (' ||
            'SELECT ' || v_column_list || ' FROM "' || r1.table_name || '"' ||
            ' MINUS ' ||
            'SELECT ' || v_column_list || ' FROM "' || r1.table_name ||'"@&dblink)',
            dbms_sql.native
            dbms_sql.define_column (v_cursor, 1, v_count1);
            v_rows_fetched := dbms_sql.execute_and_fetch (v_cursor);
            IF v_rows_fetched = 0 THEN
              RAISE NO_DATA_FOUND;
            END IF;
            dbms_sql.column_value (v_cursor, 1, v_count1);
            -- Get a count of rows in the remote table missing from the local table.
            dbms_sql.parse
            v_cursor,
            'SELECT COUNT(*) FROM (' ||
            'SELECT ' || v_column_list || ' FROM "' || r1.table_name ||'"@&dblink'||
            ' MINUS ' ||
            'SELECT ' || v_column_list || ' FROM "' || r1.table_name || '")',
            dbms_sql.native
            dbms_sql.define_column (v_cursor, 1, v_count2);
            v_rows_fetched := dbms_sql.execute_and_fetch (v_cursor);
            IF v_rows_fetched = 0 THEN
              RAISE NO_DATA_FOUND;
            END IF;
            dbms_sql.column_value (v_cursor, 1, v_count2);
            -- Display our findings.
            IF v_count1 = 0 AND v_count2 = 0 THEN
              -- No data discrepencies were found. Report the good news.
              dbms_output.put_line
              r1.table_name || ' - Local and remote table contain the same data'
              v_same_count := v_same_count + 1;
              IF v_skipped_columns = 1 THEN
                dbms_output.put_line
                r1.table_name || ' - Warning: 1 LOB or LONG column was omitted ' ||
                'from the comparison'
                v_warning_count := v_warning_count + 1;
              ELSIF v_skipped_columns > 1 THEN
                dbms_output.put_line
                r1.table_name || ' - Warning: ' || TO_CHAR (v_skipped_columns) ||
                ' LOB or LONG columns were omitted from the comparison'
                v_warning_count := v_warning_count + 1;
              END IF;
            ELSE
              -- There is a discrepency between the data in the local table and
              -- the remote table. First, give a count of rows missing from each.
              IF v_count1 > 0 THEN
                dbms_output.put_line
                r1.table_name || ' - ' ||
                LTRIM (TO_CHAR (v_count1, '999,999,990')) ||
                ' rows on local database missing from remote'
              END IF;
              IF v_count2 > 0 THEN
                dbms_output.put_line
                r1.table_name || ' - ' ||
                LTRIM (TO_CHAR (v_count2, '999,999,990')) ||
                ' rows on remote database missing from local'
              END IF;
              IF v_skipped_columns = 1 THEN
                dbms_output.put_line
                r1.table_name || ' - Warning: 1 LOB or LONG column was omitted ' ||
                'from the comparison'
                v_warning_count := v_warning_count + 1;
              ELSIF v_skipped_columns > 1 THEN
                dbms_output.put_line
                r1.table_name || ' - Warning: ' || TO_CHAR (v_skipped_columns) ||
                ' LOB or LONG columns were omitted from the comparison'
                v_warning_count := v_warning_count + 1;
              END IF;
              -- Next give the user a query they could run to see all of the
              -- differing data between the two tables. To prepare the query,
              -- first we'll break the list of columns in the table into smaller
              -- chunks, each short enough to fit on one line of a telnet window
              -- without wrapping.
              v_pos := 1;
              v_piece_count := 0;
              v_length := LENGTH (v_column_list);
              LOOP
                EXIT WHEN v_pos = v_length;
                v_piece_count := v_piece_count + 1;
                IF v_length - v_pos < 72 THEN
                  v_column_pieces(v_piece_count) := SUBSTR (v_column_list, v_pos);
                  v_pos := v_length;
                ELSE
                  v_next_break :=
                    GREATEST (INSTR (SUBSTR (v_column_list, 1, v_pos + 72),
                                     ',"', -1),
                              INSTR (SUBSTR (v_column_list, 1, v_pos + 72),
                                     ',/* "', -1),
                              INSTR (SUBSTR (v_column_list, 1, v_pos + 72),
                                     ' /* "', -1));
                  v_column_pieces(v_piece_count) :=
                    SUBSTR (v_column_list, v_pos, v_next_break - v_pos + 1);
                  v_pos := v_next_break + 1;
                END IF;
              END LOOP;
              dbms_output.put_line ('Use the following query to view the data ' ||
                                    'discrepencies:');
              dbms_output.put_line ('(');
              dbms_output.put_line ('SELECT ''Local'' "LOCATION",');
              FOR i IN 1..v_piece_count LOOP
                dbms_output.put_line (v_column_pieces(i));
              END LOOP;
              dbms_output.put_line ('FROM "' || r1.table_name || '"');
              dbms_output.put_line ('MINUS');
              dbms_output.put_line ('SELECT ''Local'' "LOCATION",');
              FOR i IN 1..v_piece_count LOOP
                dbms_output.put_line (v_column_pieces(i));
              END LOOP;
              dbms_output.put_line ('FROM "' || r1.table_name || '"@&dblink');
              dbms_output.put_line (') UNION ALL (');
              dbms_output.put_line ('SELECT ''Remote'' "LOCATION",');
              FOR i IN 1..v_piece_count LOOP
                dbms_output.put_line (v_column_pieces(i));
              END LOOP;
              dbms_output.put_line ('FROM "' || r1.table_name || '"@&dblink');
              dbms_output.put_line ('MINUS');
              dbms_output.put_line ('SELECT ''Remote'' "LOCATION",');
              FOR i IN 1..v_piece_count LOOP
                dbms_output.put_line (v_column_pieces(i));
              END LOOP;
              dbms_output.put_line ('FROM "' || r1.table_name || '"');
              dbms_output.put_line (');');
              v_diff_count := v_diff_count + 1;
            END IF;
          EXCEPTION
            WHEN OTHERS THEN
              -- An error occurred while processing this table. (Most likely it
              -- doesn't exist or has fewer columns on the remote database.)
              -- Show the error we encountered on the report.
              dbms_output.put_line (r1.table_name || ' - ' || SQLERRM);
              v_error_count := v_error_count + 1;
          END;
        END IF;
      END LOOP;
      -- Print summary information.
      dbms_output.put_line ('-------------------------------------------------');
      dbms_output.put_line
      'Tables examined: ' || TO_CHAR (v_same_count + v_diff_count + v_error_count)
      dbms_output.put_line
      'Tables with data discrepencies: ' || TO_CHAR (v_diff_count)
      IF v_warning_count > 0 THEN
        dbms_output.put_line
        'Tables with warnings: ' || TO_CHAR(v_warning_count)
      END IF;
      IF v_error_count > 0 THEN
        dbms_output.put_line
        'Tables that could not be checked due to errors: ' || TO_CHAR(v_error_count)
      END IF;
      dbms_sql.close_cursor (v_cursor);
    END;I hope , it ' ll help you...!!!!
    Regards,
    Simon

  • Table Comparison to pull back non matching data

    Hello,
    I have been working on the below for a few days now and cannot figure out how to get the desired results. Was hoping someone could point me in the right direction. I have attached the data below and the queries I have come up with so far. I only need data for MU_ID (3,7,4) and only need SKILL_NM ('THICV','HELPDESK_FOUNDATIONAL','SPANISH','AUTO','HELPDESK_COMPLEX','HOUSE_COMPLEX','BOAT','HOUSE','HELPDESK','HELPDESK_MODERATE') as there are hundreds more in the actual tables. I also have the problem of the skill levels for the foundational, moderate, complex skill names from the IEX table. If SKILL_LEVEL is 0-2 on the GEN table they are listed as _FOUNDATIONAL in the IEX table, 3-7 is _MODERATE, 8-10 is _COMPLEX but only for the SKILL_NM 'HELPDESK' & 'HOUSE'.
    CREATE TABLE IEX(
      MU_ID         NUMBER(5),
      AGENT_NM      VARCHAR2(30),
      EXTERNAL_ID   VARCHAR2(8),
      SKILL_NM      VARCHAR2(50))
    CREATE TABLE GEN(
      USER_ID       VARCHAR2(8),
      SKILL_NM      VARCHAR2(255),
      SKILL_LEVEL   NUMBER(10))
    INSERT INTO IEX(MU_ID,AGENT_NM,EXTERNAL_ID,SKILL_NM)VALUES(3,'ROBERTS,CHRIS','ROBERT1','THICV')
    INSERT INTO IEX(MU_ID,AGENT_NM,EXTERNAL_ID,SKILL_NM)VALUES(3,'ROBERTS,CHRIS','ROBERT1','HELPDESK_FOUNDATIONAL')
    INSERT INTO IEX(MU_ID,AGENT_NM,EXTERNAL_ID,SKILL_NM)VALUES(7,'SEW,HEATHER','SEW1','SPANISH')
    INSERT INTO IEX(MU_ID,AGENT_NM,EXTERNAL_ID,SKILL_NM)VALUES(7,'SEW,HEATHER','SEW1','AUTO')
    INSERT INTO IEX(MU_ID,AGENT_NM,EXTERNAL_ID,SKILL_NM)VALUES(4,'PRATT,MIKE','PRATT2','HOUSE_COMPLEX')
    INSERT INTO IEX(MU_ID,AGENT_NM,EXTERNAL_ID,SKILL_NM)VALUES(4,'PRATT,MIKE','PRATT2','HELPDESK_MODERATE')
    INSERT INTO IEX(USER_ID,SKILL_NM,SKILL_LEVEL)VALUES('ROBERT1','THICV',1)
    INSERT INTO IEX(USER_ID,SKILL_NM,SKILL_LEVEL)VALUES('ROBERT1','HELPDESK',7)
    INSERT INTO IEX(USER_ID,SKILL_NM,SKILL_LEVEL)VALUES('SEW1','SPANISH',1)
    INSERT INTO IEX(USER_ID,SKILL_NM,SKILL_LEVEL)VALUES('SEW1','BOAT',1)
    INSERT INTO IEX(USER_ID,SKILL_NM,SKILL_LEVEL)VALUES('PRATT2','HOUSE',9)
    INSERT INTO IEX(USER_ID,SKILL_NM,SKILL_LEVEL)VALUES('PRATT2','HELPDESK',2)
    DESIRED RESULTS:
    MU_ID      AGENT_NM                EXTERNAL_ID      IEX_SKILL_NM                                GEN_SKILL_NM      SKILL_LEVEL
    3                ROBERTS,CHRIS      ROBERT1            NULL                                                     HELPDESK                7
    3                ROBERTS,CHRIS      ROBERT1            HELPDESK_FOUNDATIONAL      NULL                           NULL
    7                SEW,HEATHER           SEW1                      AUTO                                                NULL                           NULL
    7                SET,HEATHER           SEW1                      NULL                                                     BOAT                           1
    4                PRATT,MIKE                PRATT2                 HELPDESK_MODERATE                     NULL                           NULL
    4                PRATT,MIKE                PRATT2                 NULL                                                          HELPDESK                2
    I wrote the 2 below queries, the first one is getting some of the data I need, but not all of it. The second one was something I was playing around with to see if it would do that I need, looks kinda like it works but pulling back way more data than I need and I cannot figure out how to have the skill level data in it.
    SELECT
    A.MU_ID,
    A.AGENT_NM,
    A.EXTERNAL_ID,
    A.SKILL_NM
    FROM IEX A
    WHERE
      A.mu_id IN
       ('3', '4', '7') AND
      UPPER (A.AGENT_NM) NOT LIKE ('%Temp%') AND
        A.EXTERNAL_ID IS NOT NULL
    AND A.SKILL_NM NOT IN
    (SELECT B.SKILL_NM
    FROM GEN B
    WHERE A.EXTERNAL_ID = B.USER_ID
    and A.SKILL_NM = B.SKILL_NM)
    ORDER BY AGENT_NM ASC
    (SELECT
       A.EXTERNAL_ID,
       A.SKILL_NM
    FROM
       IEX A
    WHERE
       A.MU_ID IN ('3', '4', '7')
    MINUS
    SELECT
       B.USER_ID,
       B.SKILL_NM
    FROM
       GEN B
    WHERE
       B.SKILL_NM IN
         ('THICV',
          'HELPDESK_FOUNDATIONAL',
          'SPANISH',
          'AUTO',
          'HELPDESK_COMPLEX',
          'HOUSE_COMPLEX',
          'BOAT',
          'HOUSE',
          'HELPDESK',
          'HELPDESK_MODERATE'))
    UNION ALL
    (SELECT
       B.USER_ID,
       B.SKILL_NM
    FROM
       GEN B
    WHERE
       B.SKILL_NM IN
         ('THICV',
          'HELPDESK_FOUNDATIONAL',
          'SPANISH',
          'AUTO',
          'HELPDESK_COMPLEX',
          'HOUSE_COMPLEX',
          'BOAT',
          'HOUSE',
          'HELPDESK',
          'HELPDESK_MODERATE')
    MINUS
    SELECT
       A.EXTERNAL_ID,
       A.SKILL_NM
    FROM
       IEX A
    WHERE
       A.MU_ID IN ('3', '4', '7'))

    Thanks Frank,
    I guess I explained it wrong. What you provided does pull back non matching data but is also pulling back matching data. Below is the exact query I am using and sample data. What is need  to show all skill_nm that do not match each other from both table. There are a handful of skill_nm that I have to use a condition with levels to make them match up based on "complex" "moderate" "foundational" but only these few need to have that condition and everything else is just straight up does skill_nm from a = skill_nm.
    My current query:
    SELECT
      A.MU_ID,
      A.AGENT_NM,
      B.USER_ID AS EXTERNAL_ID,
      A.SKILL_NM AS IEX_SKILL_NM,
      B.SKILL_NM AS GEN_SKILL_NM,
      B.SKILL_LEVEL
    FROM
      LIGHTHOUSE.IEX_AGT_SKILL A
      FULL OUTER JOIN
      LIGHTHOUSE.CFG_PERSON_SKILL_VALUES B
        ON A.EXTERNAL_ID = B.USER_ID AND
           A.SKILL_NM = B.SKILL_NM
         || CASE
                WHEN B.SKILL_NM NOT IN ('THIPayment','THIPL','SPSC') THEN NULL
              WHEN B.SKILL_LEVEL <= 2 THEN '_FOUNDATIONAL'
            WHEN B.SKILL_LEVEL <= 7 THEN '_MODERATE'
          WHEN B.SKILL_LEVEL <= 10 THEN '_COMPLEX'
         END AND
                A.MU_ID IN
             ('3','4','5','6','7','12','14','220','222','410','411','412','413','414','415','480','600','650','717','720','721',
              '722','723','800','801','3008','3010','3012','3100','4200','4201','4202','4203','4400','4401','4402','4404')
    Doing this, it is looking at the SKILL_LEVEL for all SKILL_NM and pulling back things that do match, but not on the level. I only need to have skill level match up for:
    GENESYS
    IEX
    SKILL LEVEL
    THIPayment
    THIPayment_Complex
    8 to 9
    THIPayment_Foundational
    0-1
    THIPayment_Moderate
    2 to 7
    THIPL
    THIPL_Complex
    8 to 9
    THIPL_Foundational
    0-1
    THIPL_Moderate
    2 to 7
    SPSC
    SPSC_Foundational
    0- 1
    SPSC_Moderate
    2 to 7
    PLSCLegacy
    PLSCLegacy_Complex
    8 to 9
    PLSCLegacy_Foundational
    0- 1
    PLSCLegacy_Moderate
    2 to 7
    PLSCPCIO
    PLSCPCIO_Complex
    8 to 9
    PLSCPCIO_Foundational
    0- 1
    PLSCPCIO_Moderate
    2 to 7
    CREATE TABLE IEX_AGT_SKILL(
      MU_ID         NUMBER(5),
      AGENT_NM      VARCHAR2(30),
      EXTERNAL_ID   VARCHAR2(8),
      SKILL_NM      VARCHAR2(50))
    CREATE TABLE CFG_PERSON_SKILL_VALUES(
      USER_ID       VARCHAR2(8),
      SKILL_NM      VARCHAR2(255),
      SKILL_LEVEL   NUMBER(10))
    INSERT INTO IEX_AGT_SKILL(MU_ID,AGENT_NM,EXTERNAL_ID,SKILL_NM)VALUES(3,'ROBERTS,CHRIS','ROBERT1','THIPayment_FOUNDATIONAL')
    INSERT INTO IEX_AGT_SKILL(MU_ID,AGENT_NM,EXTERNAL_ID,SKILL_NM)VALUES(3,'ROBERTS,CHRIS','ROBERT1','SPSC_FOUNDATIONAL')
    INSERT INTO IEX_AGT_SKILL(MU_ID,AGENT_NM,EXTERNAL_ID,SKILL_NM)VALUES(7,'SEW,HEATHER','SEW1','SPSC_MODERATE')
    INSERT INTO IEX_AGT_SKILL(MU_ID,AGENT_NM,EXTERNAL_ID,SKILL_NM)VALUES(7,'SEW,HEATHER','SEW1','SPSC_BOAT')
    INSERT INTO IEX_AGT_SKILL(MU_ID,AGENT_NM,EXTERNAL_ID,SKILL_NM)VALUES(4,'PRATT,MIKE','PRATT2','THIPayment_COMPLEX')
    INSERT INTO IEX_AGT_SKILL(MU_ID,AGENT_NM,EXTERNAL_ID,SKILL_NM)VALUES(4,'PRATT,MIKE','PRATT2','HELPDESK')
    INSERT INTO CFG_PERSON_SKILL_VALUES(USER_ID,SKILL_NM,SKILL_LEVEL)VALUES('ROBERT1','THIPayment',1)
    INSERT INTO CFG_PERSON_SKILL_VALUES(USER_ID,SKILL_NM,SKILL_LEVEL)VALUES('ROBERT1','SPSC',7)
    INSERT INTO CFG_PERSON_SKILL_VALUES(USER_ID,SKILL_NM,SKILL_LEVEL)VALUES('SEW1','SPSC',1)
    INSERT INTO CFG_PERSON_SKILL_VALUES(USER_ID,SKILL_NM,SKILL_LEVEL)VALUES('SEW1','SPSC_BOAT',1)
    INSERT INTO CFG_PERSON_SKILL_VALUES(USER_ID,SKILL_NM,SKILL_LEVEL)VALUES('PRATT2','SPANISH',9)
    INSERT INTO CFG_PERSON_SKILL_VALUES(USER_ID,SKILL_NM,SKILL_LEVEL)VALUES('PRATT2','HELPDESK',2)
    DESIRED OUTCOME:
    MU_ID AGENT_NM       EXTERNAL_ID    IEX_SKILL_NM                   GEN_SKILL_NM
    3     ROBERTS,CHRIS  ROBERT1           SPSC_FOUNDATIONAL
    3     ROBERTS,CHRIS  ROBERT1                                                            SPSC_MODERATE
    7     SEW,HEATHER      SEW1                     SPSC_MODERATE
    7     SEW,HEATHER      SEW1                                                                  SPSC_FOUNDATIONAL
    4     PRATT,MIKE            PRATT2                   THIPayment_COMPLEX
    4     PRATT,MIKE            PRATT2                                                              SPANISH

  • Internal table Comparison

    Hi,
    I hav 2 internal tables with some values . I want to compare the 2 tables and elimate
    duplicate entries.Wht logic i hav to use in looping ?
    Rgds,
    SAPUser100

    Sam's got the right idea if you want to delete the "duplicates" out of itab2.  If it is the other way around, then you would do the same thing swapping the itab names.  If you want to do get rid of the duplicates in both itabs and keep both itabs you will have to do it twice. 
    LOOP AT itab1.
      READ TABLE itab2 WITH KEY val = itab1-val.
      IF sy-subrc = 0.
        DELETE itab2 INDEX sy-tabix.
      ENDIF.
      CLEAR: itab1,
             itab2.
    ENDLOOP.
    LOOP AT itab2.
      READ TABLE itab1 WITH KEY val = itab2-val.
      IF sy-subrc = 0.
        DELETE itab1 INDEX sy-tabix.
      ENDIF.
      CLEAR: itab1,
             itab2.
    ENDLOOP.
    Regards,
    Rich Heilman

  • Features comparison of SharePoint Foundation 2010 & Office 365

    Hi,
    I there any documentation/chart or table comparison of features between Office 365 and SharePoint Foundation 2010?
    I can only search comparison between office 365 and SP Foundation 2013.
    Thanks!

    See http://technet.microsoft.com/en-us/library/sharepoint-online-service-description.aspx
    Towards the bottom it has the on-prem feature sets, but has all of the online and onprem feature sets listed on this page.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • How to compare two tables data...need sql report or utility to find differe

    Hi,
    We have a requirement where we are asked to find data differences between two tables and one of the tables reside on remote database. The database version is same ( 10g ) and datatypes for the tables are similar.
    The client is looking for a sql report or kind of utility to display the data differences for each column ( if possible count differences ) with some meaningful error messages.
    Could anyone let me know the best possible way of doing it..?
    Thanks
    Hitarth

    Hi,
    I found something for tables comparison but getting one error...can you check this please and let me know what is wrong
    Here is the function:
    CREATE OR REPLACE FUNCTION compare_query_results (
    p_query1 IN VARCHAR2
    , p_query2 IN VARCHAR2
    , p_raise_error_if_not_equal IN BOOLEAN DEFAULT FALSE
    , p_raise_error_if_no_rows IN BOOLEAN DEFAULT FALSE
    RETURN NUMBER
    IS
    -- Constants
    c_query_results_equal CONSTANT PLS_INTEGER := 0;
    c_query_results_not_equal CONSTANT PLS_INTEGER := 1;
    oracr CONSTANT VARCHAR2 (1) := CHR (10);
    -- Variable Declaration
    v_sql_stmt VARCHAR2 (32767);
    v_record_count PLS_INTEGER;
    v_return_code PLS_INTEGER;
    v_record DUAL.dummy%TYPE;
    v_result_set_has_rows BOOLEAN;
    -- Ref Cursors
    v_cursor sys_refcursor;
    -- Custom Defined-Exceptions
    result_sets_do_not_match EXCEPTION;
    query_returns_no_rows EXCEPTION;
    BEGIN
    -- Get the count of differing records between p_query1 and p_query2
    dbms_output.put_line('Start-1');
    v_sql_stmt :=
    ' (SELECT /*+ materialize */'
    || SUBSTR (p_query1, INSTR (UPPER (p_query1)
    , 'SELECT'
    , 1
    , 1
    ) + 6)
    || ')
    , (SELECT /*+ materialize */'
    || SUBSTR (p_query2, INSTR (UPPER (p_query2)
    , 'SELECT'
    , 1
    , 1
    ) + 6)
    || ')
    SELECT ''X''
    FROM (
    (SELECT * FROM test1 MINUS SELECT * FROM test2)
    UNION ALL
    (SELECT * FROM test2 MINUS SELECT * FROM test1)
    dbms_output.put_line('Start-2');
    OPEN v_cursor
    FOR v_sql_stmt;
    dbms_output.put_line('Start-3');
    FETCH v_cursor
    INTO v_record;
    dbms_output.put_line('Start-4');
    v_result_set_has_rows := v_cursor%FOUND;
    dbms_output.put_line('Start-5');
    CLOSE v_cursor;
    dbms_output.put_line('Start-6');
    -- If there are rows - the result sets do NOT match...
    IF v_result_set_has_rows
    THEN
    v_return_code := c_query_results_not_equal;
    IF p_raise_error_if_not_equal
    THEN
    RAISE result_sets_do_not_match;
    END IF;
    -- If there are no rows - the result sets do match...
    ELSIF NOT v_result_set_has_rows
    THEN
    IF p_raise_error_if_no_rows
    THEN
    -- Check to make sure that the queries contain rows if desired...
    v_sql_stmt := 'SELECT ''X''
    FROM (' || oracr || p_query1 || oracr || ')';
    OPEN v_cursor
    FOR v_sql_stmt;
    FETCH v_cursor
    INTO v_record;
    IF v_cursor%NOTFOUND
    THEN
    CLOSE v_cursor;
    RAISE query_returns_no_rows;
    END IF;
    CLOSE v_cursor;
    END IF;
    v_return_code := c_query_results_equal;
    END IF;
    RETURN v_return_code;
    EXCEPTION
    WHEN result_sets_do_not_match
    THEN
    raise_application_error (-20101, 'The Queries'' result sets do NOT match. Error returned
    as requested.');
    WHEN query_returns_no_rows
    THEN
    raise_application_error (-20102, 'The Queries'' result sets match, however they contain no
    rows. Error returned as requested.');
    WHEN OTHERS
    THEN
    -- Raise the error
    raise_application_error (-20103
    , 'There is a syntax or semantical error in one or both queries
    preventing comparison.'
    || oracr
    || 'Error Stack :'
    || oracr
    || DBMS_UTILITY.format_error_stack ()
    || oracr
    || 'Error_Backtrace:'
    || oracr
    || DBMS_UTILITY.format_error_backtrace ());
    END compare_query_results;
    I have created two tables ( test1 and test2 ) with few columns and with the same datatypes and executed the above function...I am getting error as folliowing:
    DECLARE
    ERROR at line 1:
    ORA-20103: There is a syntax or semantical error in one or both queries
    preventing comparison.
    Error Stack :
    ORA-00900: invalid SQL statement
    Error_Backtrace:
    ORA-06512: at "ORAOWNER.COMPARE_QUERY_RESULTS", line 53
    ORA-06512: at "ORAOWNER.COMPARE_QUERY_RESULTS", line 121
    ORA-06512: at line 12
    Could someone please help me fixing this error..It would be really appreciated
    Thanks
    Hitarth

  • Table compare deleting rows which does not exist in target table

    Hi Gurus,
    I am struggling with an issue in Data Services.
    I have a job which uses Table Compare, then History Preserving and then a Key Generation transforms.
    There is every possibility that data would get deleted from the source table.
    Now, I want to delete them from the target table also.
    I tried Detect deleted rows but it is not working.
    Could some one please help me on this issue.
    Thanks,
    Raviteja.

    Doesn't history preserving really only operate on "Update" rows.  Wouldn't it only process the deletes if you turned the "Preserve Delete row(s) as update row(s)" on?
    I would think if you turned on Detect Delete rows in the Table compare and did not turn this on in the history preserving it would retain those rows as delete rows and effectively remove them from the target.
    Preserve delete row(s) as update row(s)
    Converts DELETE rows to UPDATE rows in the target warehouse and, if you previously set effective date values (Valid from and Valid to), sets the Valid To value to the execution date. Use this option to maintain slowly changing dimensions by feeding a complete data set first through the Table Comparison transform with its Detect deleted row(s) from comparison table
    option selected.

  • Get rowns that don't exist in any of the tables.

    Hi,
    I need to implement some views to compare systems.
    This views will compare tables with the same structure and I want to extract the rows that don’t exist in any of the sides.
    I need to implement some views to compare only two tables, others to compare 3 tables and one to compare 5 tables and another to compare 10 tables!
    Each table can contains from a few rows up to 10 million rows (that was the biggest count I found for this tables).
    My test scenario:
    CREATE TABLE TEST_TABLE
    (COL1 NUMBER ,
    COL2 CHAR(25));
    CREATE TABLE TEST_TABLE2
    (COL1 NUMBER ,
    COL2 CHAR(25));
    CREATE TABLE TEST_TABLE3
    (COL1 NUMBER ,
    COL2 CHAR(25));
    insert into TEST_TABLE (COL1,COL2) values (1,'2');
    insert into TEST_TABLE (COL1,COL2) values (11,'t1');
    insert into TEST_TABLE2 (COL1,COL2)  values (1,'2');
    insert into TEST_TABLE2 (COL1,COL2) values (22,'t2');
    insert into TEST_TABLE3 (COL1,COL2) values (1,'2');
    insert into TEST_TABLE3 (COL1,COL2) values (33,'t3');To find the differences between two tables I implemented the following:
    select * from
    (select * from TEST_TABLE
    minus
    select * from TEST_TABLE2
    union all
    (select * from TEST_TABLE2
    minus
    select * from TEST_TABLE
    Result:
    COL1 COL2
    11     t1                      
    22     t2                       For the 3 tables comparison The result should be:
    Result:
    COL1 COL2
    11     t1                      
    22     t2                      
    33     t3                       For the other ones I can implement the same way, but for sure this is not the prettiest and most performing solution!
    How can I achieve the result I intent with the most performance?
    Thanks,
    Ricardo Tomás

    You didn't say if you allow duplicates in your tables, so i assumed you didn't.
    If a single table could have multiple occurrences of a given col1, col2 combination you would need to distinct the col1,col2 list from each table before doing the union all.
    ME_XE?  select
      2     col1, col2
      3  from
      4  (
      5     select col1, col2       from test_table
      6             union all
      7     select col1, col2       from test_table2
      8             union all
      9     select col1, col2       from test_table3
    10  )
    11  group by
    12     col1, col2
    13  having count(*) = 1;
                  COL1 COL2
                    33 t3
                    22 t2
                    11 t1
    3 rows selected.
    Elapsed: 00:00:00.01
    ME_XE?

Maybe you are looking for

  • How to open a specific Calendar in Outlook

    Hi, I'm struggling to find an example on other forums, or not understanding the code. I want to open a non-default calendar in Outlook to create an appointment (it's a hotmail account, which is shared with a couple of people, so that they can all see

  • Modify PDF documents to activate the "overprint preview"  the document opens in Acrobat 9 / X

    Hallo , I would like to modify PDF documents that the document automatically activate the "Overprint Preview" option if they opened by using Acrobat Reader, Acrobat Stand. or Acrobat Prof. Version 9 or X. It is important that it makes no different wh

  • Start and End dates for users in Enterprise portal

    Hi Expert, I have to maintain start and end dates for around 200 users in 4 different Java systems. When I export the file of users it does not capture the validity fields. Is there a way/script to automate this? Otherwise I will have to do it manual

  • How to move all contacts from phone to sim card?

    Could someone advise me how to move all contacts in my Treo 500 from the phone to its SIM card, and what is the capacity of the SIM card as I have approx 700 contacts in the phone. Thanks, Stuarp77 Post relates to: Tungsten E

  • Exchange 2007 script problem

    If I comment the first line and uncomment the second the script runs as expected, or when it's run for one individual contact.  But when it's run against the entire OU it fails and returns the error at the bottom of the posting.  Any ideas? $MC = get