Comparison of columns

I need to compare two columns (SKU) on different sheets. When a number match corresponding cell in the price column must be entered on the first sheet in a new column named price.

I tried to use the SEARCH and that seemed to work, as some results were noted as 'could not find the requested value', but others had entered price and when I was checking at random I found many others who were incorrect. I don't understand how a price was listed if it was not a match to the other sheet.

Also, I wonder if I should be using a different formula.

Thank you for your help.

Hi jkeppel,

Lookup() can be very useful, but will return a tight match.

I generally use the INDEX/MATCH to do all my research. You can restrict it to exact match (find value) and it's actually easier than HLOOKUP() and VLOOKUP(). It also returns an error if you set it to correspond to a value that is not in the table of your choice.

C2 = INDEX (Lookup: B (B2, Lookup::A,0)) MATCH)

Quinn

Tags: iWork

Similar Questions

  • Comparison of column in the form of table II

    Hello

    At the APEX 4.1 I am doing something similar to this thread: in table form: compare two fields in column where I need to do a validation on two columns in tabular form. It works for both columns are columns of text box, but I can't make it work when comparing to a single column to display. For validation, I have defined it as an "Expression of PL/SQL" and my expression is: CURRENT_VALUE >: PREV_VALUE where CURRENT_VALUE is a column of text box that accepts user input and PREV_VALUE is only one display column.

    Regardless of the absorbed power, the row is updated without any errors raised; He seems to treat the single display value in the vacuum and made the comparison with an empty value. The only solution I could find was to make the comparison in a update trigger on and will raise an error if validation fails; but the result is not as nice as the built in features of validation of the APEX.

    No indication on how to make it work using the validation of the APEX is greatly appreciated.

    Thank you!

    Only column display are for display only and are not saved in the session when you send, so that you can't access with pl/sql.

    So either do the validation in javascript/jQuery or, and it is best if you ask me, make a text field and set to read-only.

  • Comparison of column values for Char and numbers

    Hello

    I have a requirement to compare the columns of the two tables value as described below-

    Table - T1 (NAME VARCHAR2, VARCHAR2 VALUE)
    NAME    VALUE
    A       1
    B       ABC
    C       2
    D       XYZ
    Table - T2 (NAME VARCHAR2, VARCHAR2 VALUE)
    NAME    VALUE
    A       1
    B       ABCD
    C       4
    D       XYZ
    Column 'NAME' is unique in the two tables. The comparison must exact match for the values of character ("ABC" = "ABCD", "XYZ" = "XYZ"), but in the numerical values, there must be a comparison of the value (T1. VALUE < T2. (VALUE).

    For example, the output from the example table above should be-
    T1.NAME    T1.VALUE    T2.VALUE
    A          1           1
    C          2           4
    D          XYZ         XYZ
    Thank you for your time and please let me know if any necessary clarification.

    Khayyam wrote:
    you mean that the following output?

    C     2     4
    D     XYZ     XYZ
    

    Because T1. VALUE< t2.value="" (1="" not=""><>

    Try this:

    WITH t1 AS (SELECT 'A' name, '1' VALUE FROM DUAL
    UNION
    SELECT 'B', 'ABC' FROM DUAL
    UNION
    SELECT 'C', '2' FROM DUAL
    UNION
    SELECT 'D', 'XYZ' FROM DUAL),
    t2 AS (SELECT 'A' name, '1' VALUE FROM DUAL
    UNION
    SELECT 'B', 'ABCD' FROM DUAL
    UNION
    SELECT 'C', '4' FROM DUAL
    UNION
    SELECT 'D', 'XYZ' FROM DUAL)
    SELECT *
    FROM (SELECT name, t1.VALUE t1val, t2.VALUE t2val
    FROM t1 JOIN t2 USING (name)
    WHERE NOT REGEXP_LIKE (t1.VALUE, '[[:digit:]]'))
    WHERE t1val = t2val
    UNION
    SELECT *
    FROM (SELECT name, t1.VALUE t1val, t2.VALUE t2val
    FROM t1 JOIN t2 USING (name)
    WHERE REGEXP_LIKE (t1.VALUE, '[[:digit:]]'))
    WHERE t1val < t2val
    

    Note that this will work in 10G and 11G (supported regular expression) databases.

    Add<= then="" op="" expected="" output="" will="" come="">

    WITH t1 AS (SELECT 'A' name, '1' VALUE FROM DUAL
                UNION
                SELECT 'B', 'ABC' FROM DUAL
                UNION
                SELECT 'C', '2' FROM DUAL
                UNION
                SELECT 'D', 'XYZ' FROM DUAL),
         t2 AS (SELECT 'A' name, '1' VALUE FROM DUAL
                UNION
                SELECT 'B', 'ABCD' FROM DUAL
                UNION
                SELECT 'C', '4' FROM DUAL
                UNION
                SELECT 'D', 'XYZ' FROM DUAL)
    SELECT *
      FROM (SELECT name, t1.VALUE t1val, t2.VALUE t2val
              FROM t1 JOIN t2 USING (name)
             WHERE NOT REGEXP_LIKE (t1.VALUE, '[[:digit:]]'))
     WHERE t1val = t2val
    UNION
    SELECT *
      FROM (SELECT name, t1.VALUE t1val, t2.VALUE t2val
              FROM t1 JOIN t2 USING (name)
             WHERE REGEXP_LIKE (t1.VALUE, '[[:digit:]]'))
     WHERE t1val <= t2valWITH t1 AS (SELECT 'A' name, '1' VALUE FROM DUAL
                UNION
                SELECT 'B', 'ABC' FROM DUAL
                UNION
                SELECT 'C', '2' FROM DUAL
                UNION
                SELECT 'D', 'XYZ' FROM DUAL),
         t2 AS (SELECT 'A' name, '1' VALUE FROM DUAL
                UNION
                SELECT 'B', 'ABCD' FROM DUAL
                UNION
                SELECT 'C', '4' FROM DUAL
                UNION
                SELECT 'D', 'XYZ' FROM DUAL)
    SELECT *
      FROM (SELECT name, t1.VALUE t1val, t2.VALUE t2val
              FROM t1 JOIN t2 USING (name)
             WHERE NOT REGEXP_LIKE (t1.VALUE, '[[:digit:]]'))
     WHERE t1val = t2val
    UNION
    SELECT *
      FROM (SELECT name, t1.VALUE t1val, t2.VALUE t2val
              FROM t1 JOIN t2 USING (name)
             WHERE REGEXP_LIKE (t1.VALUE, '[[:digit:]]'))
     WHERE t1val <= t2val
    
    NAME T1VAL T2VAL
    ---- ----- -----
    A    1     1
    C    2     4
    D    XYZ   XYZ   
    
    3 rows selected
    
  • Comparison of columns in the same Table, with the exception

    Hi all


    I need compare two values of column in the same table. But should ignore a few characters like space, comma, point

    Following should be consistent
    'ABcd f' = 'AbCDf'
    'xyz ..' = 'xy z'
    How is it possible


    See you soon

    Sexy
    with t as
    (
    select 'ABcd f' col1,'AbCDf' col2 from dual union all
    select 'xyz ..','xy z' from dual union all
    select 'xyz ..x','xy z' from dual
    )
    select *
    from t
    where upper(translate(col1,'a ,.','a')) =
               upper(translate(col2,'a ,.','a'));
    
    COL1    COL2
    ------- -----
    ABcd f  AbCDf
    xyz ..  xy z  
    

    Published by: JAC on 4 February 2013 17:22

  • Comparison of column level with different database to different server

    Hi all


    I have two database on the other server. I want to find the difference between the tables in the two tables for example same table with different column, it can happen...


    How to compare two tables column level with two differnet Server database.



    Thanks in advance.

    user647572 wrote:
    Hi all

    I have two database on the other server. I want to find the difference between the tables in the two tables for example same table with different column, it can happen...

    How to compare two tables column level with two differnet Server database.

    SELECT * FROM USER_TAB_COLUMNS
    LESS
    SELECT * FROM USER_TAB_COLUMNS@REMOTE
    UNION
    SELECT * FROM USER_TAB_COLUMNS@REMOTE
    LESS
    SELECT * FROM USER_TAB_COLUMNS;

  • String comparison between columns in different tables

    Hi all

    I have two tables. Table A and table B with Column3 column Column1 respectively I would search for lines in the Table B Column3 containing strings that exist in table Column1 has.

    For example,.

    Table A table B
    < here >
    Column1 Column3
    < here >
    Vol01/net/ddrr-pp01-ts001/flight/vol03
    vol02 \\ddrr-xx01-ts001\yy123-ds02
    vol03/net/ddrr-zz01-ts001/flight/vol01/4555/xxx
    XXX01 \\ddrr-pp01-ps001\vol01\yyyy\
    xx0333/net/ddrr-pp01-ds001/flight/vol01/xxx/77777
    / net/ddrr-pp00-ts001/flight/vol02 yy123-ds02

    I tried to play with substr but have not found it is repeating until I wanted to do... with something like this

    Select a.column1, b.column3 from tableA, tableB b where a.column1 = substr (b.column3, 5, max (length (a.column1)))

    Any help to guide me in the right direction will be greatly appreciated.

    Thank you.

    Or we can use the combination of SUBSTR and INSTR REGEXP_LIKE:

    with a as (
               select 'vol01' column1 from dual union all
               select 'vol02' from dual union all
               select 'vol03' from dual union all
               select 'xxx01' from dual union all
               select 'xx0333' from dual union all
               select 'yy123[ds02' from dual
              ),
         b as (
               select '/net/ddrr-pp01-ts001/vol/vol03' column3 from dual union all
               select '/net/ddrr-pp01-ts001/vol032/123' from dual union all
               select '\\ddrr-xx01-ts001\yy123[ds02' from dual union all
               select '/net/ddrr-zz01-ts001/vol/vol01/4555/xxx' from dual union all
               select '\\ddrr-pp01-ps001\vol01\yyyy\' from dual union all
               select '/net/ddrr-pp01-ds001/vol/vol01/xxx/77777' from dual union all
               select '/net/ddrr-pp00-ts001/vol/vol02' from dual
              ),
    -- end of on-the-fly data sample
         c as (
               select  column1,
                       column3,
                       instr(column3,column1) position
                 from  a,
                       b
                 where instr(column3,column1) > 0
              )
    select  column1,
            column3
      from  c
      where regexp_like(substr('!' || column3,position),'\W')
        and regexp_like(substr(column3 || '!',position + length(column1)),'\W')
    /
    
    COLUMN1    COLUMN3
    ---------- ----------------------------------------
    vol01      /net/ddrr-zz01-ts001/vol/vol01/4555/xxx
    vol01      \\ddrr-pp01-ps001\vol01\yyyy\
    vol01      /net/ddrr-pp01-ds001/vol/vol01/xxx/77777
    vol02      /net/ddrr-pp00-ts001/vol/vol02
    vol03      /net/ddrr-pp01-ts001/vol/vol03
    vol03      /net/ddrr-pp01-ts001/vol032/123
    yy123[ds02 \\ddrr-xx01-ts001\yy123[ds02
    
    7 rows selected.
    
    SQL> 
    

    SY.

  • Compare and display several column data according to requirement

    Hello

    I have a requirement where I want to compare the data in two tables and display only the columns if there is a gap using the sql query.

    Tell userid, e-mail and phone number of the same employee is stored in two tables. Now, I want to compare data from e-mail and phone number of the two tables and display the e-mail and phone number as if they are different data.

    Employee table:

    user_id E-mail phone
    emp01[email protected]00200
    emp02[email protected]

    00300

    emp03[email protected]00400

    Table user_details:


    ID user_email user_phone
    emp01[email protected]00201
    emp02(null)00300
    emp03[email protected]00401


    Please note that both tables have completely different column names and the data may contain a null as well. What I want to achieve is to compare the same employee data in both tables and display columns that have a different value of user_details table; as:


    user_id user_email phone
    emp01[email protected]00201
    emp02(null)
    emp03[email protected]00401


    As the table column names are different, I can't use a join and less to know the difference. I tried this with the help of CASES after the WHERE clause for comparison of columns multiple but GOLD or AND the two would defy the condition to display all columns with different data for the same line.


    How to do this without creating a separate view or a table that I don't have write access? Pointers would be useful.


    -Thank you.


    No need for something like

    You just run

    Select k.user_id, k.id,.

    e.email, u.user_email,

    e.Phone, u.user_phone

    of user_key_table k

    left outer join

    e employee

    On k.user_id = e.user_id

    left outer join

    user_details u

    on k.user_id = u.id


    the rest is here just to simulate your tables (I don't want to create tables in my APEX Tablespace as there are far too many people already)

    Concerning

    Etbin

  • How to compare data from the two table column by column and connect the result compared to the separate table

    Hello experts...

    I'm new to this forum and Oracle coding complex.

    I have a task in which I want to compare two tables with the same structure, same columns. My Oracle database is 11g Release 2. I want this column-by-column comparison and save the result in a separate table. (say result_table)

    The structure of the table would be as follows:

    SQL > desc emp;

    Name                                      Null?    Type

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

    EMPNO NOT NULL NUMBER 4

    ENAME VARCHAR2 (10)

    JOB                                                VARCHAR2(9)

    MGR                                                NUMBER(4)

    HIREDATE DATE

    SAL                                                NUMBER(7,2)

    COMM                                               NUMBER(7,2)

    DEPTNO NUMBER (2)

    SQL > emp_comp desc;

    Name                                      Null?    Type

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

    EMPNO NOT NULL NUMBER 4

    ENAME VARCHAR2 (10)

    JOB                                                VARCHAR2(9)

    MGR                                                NUMBER(4)

    HIREDATE DATE

    SAL                                                NUMBER(7,2)

    COMM                                               NUMBER(7,2)

    DEPTNO NUMBER (2)

    Both of the tables EMPNO is the primary key.

    I want to compare these two tables based on the EMPNO (EMPNO even is both tables).

    The result log table would be as follows:

    SQL > create table result_table

    2 (check_sr_no, number (5),)

    table_name 3 varchar2 (30),

    ROW_ID 4 varchar2 (20).

    column_name 5 varchar2 (20).

    6 column_data varchar2 (1000).

    compared_by 7 varchar2 (10));

    Table created.

    SQL > alter table result_table

    2 Add the constraint result_table_pk

    3 primary key (check_sr_no);

    Modified table.

    The name of the table and the name of the column will not be hardcoded (based parameter by user)

    I tried to use the dbms_comparison package, but do not find comparison of column to column.

    I also used by using the query operator LESS. It's showing the difference in rank.

    I also went to https://asktom.oracle.com/pls/apex/f?p=100:11:0:P11_QUESTION_ID:2151582681236

    Your help will be very appreciated.

    Thank you

    DK

    Tom Kyte has answered this question MANY times over the years. Here are links for its solution

    https://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:4934799800346640847

  • ODI 12 c: IKM for differential insert and update with a sequence in the target table

    Hello

    I have a map where I fill in a column of my target table using a database sequence. Now my mapping is supposed to load the target gradually table. So I need a revenge for update and incremental insert. Now with this differential IKM it compares all the columns to match all colmuns line to understand, it should be an insert or update. Now, the following code shows that when the ROW_WID is loaded with a sequence of database.

    If NOT EXISTS

    (select 1 from W_LOV_D T

    where T.ROW_WID = S.ROW_WID

    and ((T.CREATED_BY = S.CREATED_BY) or (T.CREATED_BY IS NULL and S.CREATED_BY IS NULL)) and

    ....

    ....

    < the rest of the comparison of columns >

    )

    So when running ODI returns following error

    Caused by: java.sql.SQLSyntaxErrorException: ORA-00904: "S". "" ROW_WID ": invalid identifier

    Please suggest if there is no other IKM I should use or if there is another way around it without changing the code IKM...

    Hi Marc,

    Thanks for your reply.

    I had solved it. The incremental update process inserts all rows from the source table to I$ table that exists in the target table. It does so by the where sql such as mentioned in my questions as

    WHERE THERE is NOT ( . COLUMNS = . COLUMNS)

    Now in the incremental update IKM Oracle to retrieve all the columns it uses the substitution with parameter as TABLE TARGET. Due to this column sequence will in the comparison and the request fails. When I used the IKM SQL incremental update it used INTEGRATION TABLE as parameter table to pick up the columns, as I'd mentioned in the target sequence is run, so it does not get the sequence column.

    Simple answer: to solve this, use incremental update of the SQL IKM.

    Thank you

    SM

  • SQL Query search line differences

    Hi all!

    It will probably be a super easy question and a solution for someone.  Here's my scenario.

    • 2 tables (Table_1, Table_2)
    • 3 columns (A, B, C)
    • Table_1 unless Table_2 records, if I want to find records in Table_2 who aren't in Table_1
      • I don't like to find the records that are in Table_1 and Table_2
    • I'll do the comparison with column a.

    For simplicity, lets say a 10 lines total Table_1 and Table_2 15 total of lines.  He must only find 5 rows that are not in Table_1 and Table_2.  So, if I add the number of records found in Table_2 Table_1 total records, then I would have at least the same amount of records in Table_1 and Table_2, if not more.  Also, is there a way where I can insert the differences between the lines found in a 3rd table "to stop"?

    The example is provided below.

    Table_1

    A | B | C

    1. Bonneau | something

    2. Bonneau | something

    3. Bonneau | something

    4. Bonneau | something

    5. Bonneau | something

    Table_2

    A | B | C

    1. Bonneau | something

    3. Bonneau | something

    5. Bonneau | something

    6. Bonneau | something < = difference

    7. Bonneau | something < = difference

    In fact, there are millions of records in both tables.  I have a solution for this, but it would require me to do... Export results from Table_1 and Table_2.  Open the two results in Excel and run a macro to know the difference.  Once I found the difference, I save and import the results into the 3rd table 'intermediate '.

    Any help would be great!  Thank you!

    Hello

    You can use a subquery NOT EXISTS or NOT IN the for.

    For example, scott.dept and scott.emp are assimilated by deptno.  To find all the rows in the dept who do not have a corresponding row in the emp:

    SELECT *- or all of the columns that you want to

    OF scott.dept

    WHERE deptno NOT IN ((in English only)

    SELECT DeptNo

    FROM scott.emp

    WHERE deptno IS NOT NULL - if necessary

    )

    ;

    When you use a NOT IN subquery, check that the subquery cannot produce NULL values.

    I hope that answers your question.

    If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and also publish outcomes from these data.  Include an example where the column has is identical in the two tables, but columns B and C are not.

    Post your best attempt (use one of the solutions of publication) and specify where it's getting incorrect results, explain, using specific examples, how you get the right results from data provided in these places.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: https://forums.oracle.com/message/9362002

  • Compare the table structures in different schemas. help please

    Hi all

    I have a question...


    I have pictures on different schemas something like


    Diagram A
    -------------
    Table 1
    Table 2
    Table 3


    Diagram B
    ------------
    Table 1
    Table 2
    Table 3


    Now situation is table 1 and table 2 will have a similar structure or table 1 in Figure B will have additional columns.

    like so... on... for all other tables...

    example!
    Schema A:
    
    Desc Table 1;
    
    Name                                  Type            Null
    -------------                             -------             -------
    No                                Number            Notnull
    Name                           Varchar2(10)     Not null
    Fee                              Number (10,2)   Not null
    
    
    
    Scheam B;
    
    Desc Table1;
    
    Name                                  Type               Null
    -------------                             -------             -------
    DX_No                                Number            Notnull
    DX_Name                           Varchar2(10)      Not null
    DX_Fee                              Number (10,2)   Not null
    comments                          Varchar(2)        
    Now I need to write some sort of procedure for the thing to compare these tables which are in different in the column names in the schema and get it had exported to an Excel sheet.
    and here it's first three columns SHOULD BE CONSIDERED AS SAME even if the DX_ prefix are from the REST OF the PART OF THE COLUMN NAME IS SAME.

    and the same way commit coloumn new schema B only... So it should be noted that excel sheets...

    I don't know how the ADO or SQL Developer handle this... Is there any plsql block that I can write to do it...

    Thanks in advance...

    Comparison of columns on all the tables in the two schema

    select tc1.owner,tc1.TABLE_NAME,tc1.COLUMN_NAME,
           tc2.owner,tc2.TABLE_NAME,tc2.COLUMN_NAME
    from
      all_tab_columns tc1
      full outer
      join all_tab_columns tc2 on &user1=tc2.owner
                               and tc1.TABLE_NAME=tc2.TABLE_NAME
                               and tc1.COLUMN_NAME like '%'||tc2.COLUMN_NAME
    where
    tc1.owner=&user2
    and tc1.TABLE_NAME in (
                          select t1.table_name
                          from all_tables t1
                          join all_tables t2 on t2.owner=&user2 and t1.table_name=t2.table_name
                          where t1.owner=&user1)
    

    Published by: xtender on 06.11.2010 12:43

  • Count with letters instead of numbers

    Hello world

    Today, I had an obligation to represent the rownums of a Recordset (1, 2, 3, 4, 5 and so on) as the letters (A, B, C, D, E and so on). First I thought there is a database function equal to the function to_char with RN parameter (which is capable of easily converting numbers to Roman numerals)... but I found nothing of didn t.

    So is it a database work that I have not yet found a haven´t or you have a custom code to make me realize this?

    Ty in advance
    -Oliver

    Hello

    I don't think it's quite as simple as that. OP is not a number of base-26, because there is nothing quite like a 0 in this system, and therefore nothing quite like a 0.
    In a base-26 system, you could represent 26 ^ 2 ^ distinct numbers with strings up to 2 characters.
    OP wants something where you can represent 26 ^ 2 ^ + 26 separate numbers with strings up to 2 characters: 26 issues of the strings of characters-1 a set completely disjoint from 26 ^ 2 ^ ros with 2 strings.

    I think the OP needs something more complicated, like this:

    CREATE OR REPLACE FUNCTION to_abc
    (      in_num       IN        PLS_INTEGER               -- Number to be converted
    )
    RETURN     VARCHAR2
    DETERMINISTIC
    IS
         in_num_26     PLS_INTEGER    := MOD (in_num, 26);
         rest          PLS_INTEGER;
         return_txt     VARCHAR2 (30);
    BEGIN
         IF  in_num IS NULL
         THEN
              RETURN     NULL;
         ELSIF  in_num <= 0
         THEN
              RETURN  '-';
         END IF;
    
         return_txt := CHR ( 64 + CASE
                             WHEN  in_num_26 = 0
                             THEN  26
                             ELSE  in_num_26
                                  END
                      );
    
         rest := CEIL (in_num / 26);
    
         IF  rest = 1
         THEN
              RETURN     return_txt;
         ELSE
              RETURN  to_abc (rest - 1) || return_txt;
         END IF;
    END     to_abc;
    

    Script test (including your base26 function, for comparison):

    COLUMN     base26          FORMAT     A10
    COLUMN     right_txt     FORMAT     A10
    COLUMN     to_abc          FORMAT     A10
    
    SET     NULL     "[NULL]"
    
    WITH test_nums     AS
    (
         SELECT     0 AS n,     '-' AS right_txt     FROM dual     UNION ALL
         SELECT     1,        'A'               FROM dual     UNION ALL
         SELECT     10,        'J'               FROM dual     UNION ALL
         SELECT     26,        'Z'               FROM dual     UNION ALL
         SELECT     27,        'AA'               FROM dual     UNION ALL
         SELECT     28,        'AB'               FROM dual     UNION ALL
         SELECT     52,        'AZ'               FROM dual     UNION ALL
         SELECT     53,        'BA'               FROM dual     UNION ALL
         SELECT     78,        'BZ'               FROM dual     UNION ALL
         SELECT     79,        'CA'               FROM dual     UNION ALL
         SELECT     702,        'ZZ'               FROM dual     UNION ALL
         SELECT     703,        'AAA'               FROM dual     UNION ALL
         SELECT     1404,       'BAZ'               FROM dual     UNION ALL
         SELECT     1405,       'BBA'               FROM dual     UNION ALL
         SELECT     18278,     'ZZZ'               FROM dual     UNION ALL
         SELECT     18279,     'AAAA'               FROM dual     UNION ALL
         SELECT     18280,     'AAAB'               FROM dual     UNION ALL
         SELECT     NULL,     NULL               FROM dual
    )
    SELECT     n
    ,     to_abc (n)     AS to_abc
    ,     right_txt
    ,     CASE
              WHEN  NVL (to_abc (n), '??') =
                    NVL (right_txt,  '??')
              THEN  ' '
              ELSE  '<== WRONG!'
         END             AS flag
    ,     base26 (n)     AS base26
    FROM     test_nums
    ORDER BY  n
    ;
    

    Results of the test script:

    .        N TO_ABC     RIGHT_TXT  FLAG       BASE26
    ---------- ---------- ---------- ---------- ----------
             0 -          -                     [NULL]
             1 A          A                     a
            10 J          J                     j
            26 Z          Z                     aa
            27 AA         AA                    aa
            28 AB         AB                    ab
            52 AZ         AZ                    ba
            53 BA         BA                    ba
            78 BZ         BZ                    ca
            79 CA         CA                    ca
           702 ZZ         ZZ                    aaa
           703 AAA        AAA                   aaa
          1404 BAZ        BAZ                   bba
          1405 BBA        BBA                   bba
         18278 ZZZ        ZZZ                   aaaa
         18279 AAAA       AAAA                  aaaa
         18280 AAAB       AAAB                  aaab
    [NULL]     [NULL]     [NULL]                [NULL]
    
  • How to make the comparison operation in the same column

    Hello

    here to fix vi I want to make the comparison of the 3rd column operation.

    I tried with different ways, but I didn't want to result.

    Please guide me how to compare the column value with the previous measured all 3rd.

    I want to compare the current value with the previous value, and if the current value is less, one of the previous then LED must be OFF.

    Thank you very much.

    Same basic idea, but less code...

  • Compare multiple columns and update a column based on the comparison

    Hi all

    I have to update the column STATUS of the slot structure of the table.

    Status should be 'P' if all the columns count are equal on the other should be "F".

    The value of the column can be "NA'. If the value is NA, then avoid this comparison column; compare only other 3 columns.

    My output should look like below.

    State of cnt1, cnt2 cnt3 ID cnt4

    1   4       4       4     4       P

    2   4       5       4     4       F

    3 4 4 NA 4 P

    NA 4 4 3 4

    I tried with the statemnt with BOX WHEN conditions and DECODE UPDATE, but could not succeed, can someone please help

    To do this, if you use my statement in response #11 box (Re: Re: comparison of multi-column and update a column based on the comparison of)

  • Default value in always different columns in the comparison tool

    Hi all

    I generated a script of my model, in this script, I have a few columns with a default value,
    After that I tried to compare with the import/datadictionary permutation model target my datamodeler with my database model,
    but for all the columns that I've set the default, I found differences, when I check that the values are identical except for the space at the end of the value.
    I checked the script and it's the row of the column:

    LAST_MOD_TS DEFAULT SYSTIMESTAMP TIMESTAMP NOT NULL

    AS you can see in the line is a double space between SYSTIMESTAMP and NOT NULL,.
    This double space generates a default 'SYSTIMESTAMP' to the column value and the comparison tool is good then it's a difference,
    but this difference is generated by the double space generated by the Publisher of the DOF.

    I don't know if I can change something in my configuration of the tool to solve the problem,

    Thanks in advance

    Hello

    Thanks for reporting this problem. I connected a bug on this issue.

    David

Maybe you are looking for