Comparison of the value

Hi all

I need to compare two table datas and get the descripencies. The main table is M_data that has 15 columns and another name in the Loaded_data table that has 21 columns. First, I took the names of similar columns between the two tables and LEFT on the M_data table join. While the two tables has a first column Code, in the main table, the values are as 80,83, 70.98, 88,90 etc. but the Loaded table includes values like 8083, 7093,8890. Where is it possible that we can compare the values such that convert values of (8083, 7093,8890) please advice.

The Oracle worm: 10g
Thanks in advance.

Maybe I'm missing something, but don't you divide just a side of 100 (or multiply the other side by 100)?

WHERE master_table.column_name = loaded_table.column_name / 100

Justin

Tags: Database

Similar Questions

  • Comparison of the values of the choose/when/otherwise

    I have the following logic to choose/when/otherwise
    At run time, even if PersonId value equals the ManagerId, he always goes in the clause otherwise

    CHOOSE
    WHEN PersonId = ManagerId
    display ManagerComments
    END WHEN
    WHEN PersonId! ManagerId =
    display WorkerComments
    END WHEN
    IN THE OPPOSITE CASE
    view comments
    END OTHERWISE
    CHOOSE END

    If I print the value of the PersonId and ManagerId, they are equal and that they are strings.
    PersonId is a parameter that is passed to the report.

    any help will be greatly appreciated.

    Can you send me the RTF and xml for [email protected]? file example I'll take a peek and try to help.

    Thank you
    Bipuser

  • Comparison of the values of two consecutive lines.

    Hello.
    I can compare the value of the same field in two consecutive rows?

    If this is the case. How could I do?

    Thanks in advance

    Hello

    Check [function Lag Lead | http://www.oracle-base.com/articles/misc/LagLeadAnalyticFunctions.php].

    Twinkle

  • 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
    
  • How to solve the comparison between a value with static type of string and type possible unrelated numb

    I'm new on this and any help would be greatly appreciated, Im trying to display numbers customized for the values of a Hslider.

    Here is my code so far:

    <? XML version = "1.0" encoding = "utf-8"? >

    < s:Application ' xmlns:fx = ' http://ns.Adobe.com/MXML/2009 "

    " xmlns:s = 'library://ns.adobe.com/flex/spark"" "

    "xmlns:MX ="library://ns.adobe.com/flex/mx"minWidth ="955"minHeight ="600">

    < fx:Declarations >

    <! - Place non-visual elements (e.g., services, items of value) here - >

    < / fx:Declarations >

    < fx:Script >

    <! [CDATA]

    Import mx.events.SliderEvent;

    protected function ValueSlider_changeHandler(event:SliderEvent):void

    {

    ValueLabel.text = String (ValueSlider.value);

    if (ValueSlider.value == '0')

    ValueLabel.text = '150';

    if (ValueSlider.value == '1')

    ValueLabel.text = "333";

    if (ValueSlider.value == '2')

    ValueLabel.text = "543";

    if (ValueSlider.value is "3")

    ValueLabel.text = "9342";

    }

    []] >

    < / fx:Script >

    "" < s:Panel x = "199" y ="141" width = "250" height ="200">

    "" " < s:HSlider id ="ValueSlider'x ='74"y ="68"maximum ="5"" minimum = "0" stepSize = "1"/ > "

    "" < s:Label id = "ValueLabel"x ="109" y ="38" text = "Label"/ > "

    < / s:Panel >

    < / s:Application >

    Take a look at this project below. I modified your example. You can control the cursor changes over the link or explicitly manage events:

    http://ns.Adobe.com/MXML/2009.

    xmlns:s = "library://ns.adobe.com/flex/spark".

    xmlns:MX = "library://ns.adobe.com/flex/mx" minWidth = "955" = "600" minHeight >

    const CONVERSION: Array = ['150', '333', '543', "9342"];

    Import mx.events.SliderEvent;

    protected function valueSlider2ChangeHandler(event:Event):void

    {

    valueLabel2.text = CONVERSION [event.currentTarget.value];

    }

    ]]>

  • Comparison of the 2 values of forms 6i

    Hello world
    I have a form where a person types all users that we have in society, but each user id must be typed by this person who will probably in the future insert a code which is already in the database. The id field is not null, but I would like to know how I can add a trigger to compare the value typed with those I have already in the database, so that the user knows that this user id already exists.
    Can you guys please help me with this?
    Thanks in advance!

    There are many ways, you could do that. One way would be to create a trigger when-validate-point on the UserID field that checks the database to see if the value already exists and throw an exception if it exists. For example:

    /* When-Validate-Item trigger */
    DECLARE
         n_dummy     NUMBER := 0;
    
         CURSOR test_User_ID IS
              SELECT count(*)
                FROM YOUR_TABLE_NAME_HERE
              WHERE USER_ID = :YOUR_BLOCK_NAME.USER_ID;
    BEGIN
         OPEN test_User_ID;
         FETCH test_User_ID INTO n_dummy;
         CLOSE test_User_ID;
    
         IF ( n_dummy > 0 ) THEN
              MESSAGE('User ID " '||:YOUR_BLOCK_NAME.USER_ID||' " already exists.  Please enter a unique User ID.',ACKNOWLEDGE);
              RAISE Form_Trigger_Failure;
         END IF;
    END;
    

    Please understand that this is some code examples and should be modified in order to work on your form. Also note, I am not positive the setting of 'RECOGNITION' to the built-in MESSAGE is valid for Forms 6i. Please confirm before use.

    I hope this helps.
    Craig...

    If I or someone else answer is useful or appropriate, please mark accordingly

  • Help with the name of the comparison of the output of an sql subquery value function

    Oracle 10 g

    The problem is I want to compare the value obtained from the subquery with the next value in the values of the column from the main query

    Add a view called bioChemCompare to show the content average A-level biology and in the average grade of A-level chemistry for students of each school that has an average GCSE score between 6.5 and 7.0 (inclusive). The
    calculations should be carried out only on students who studied BOTH the biology and chemistry of A'level.

    I have a query like
    select   g.grade from comqdhb.gradevalues@glink g
    where  g.value > ( select avg(g.value)
    from    comqdhb.gradevalues@glink g
    ,         comqdhb.subject@glink sb
    ,         comqdhb.studentingroup@glink sg
    ,         comqdhb.teachinggroup@glink tg
    ,         comqdhb.student@glink s
    ,         average_gcse gc
    where g.grade=sg.grade 
    and     gc.avg_gcse between 6.5 and 7
    and     gc.upn=s.upn
    and     g."LEVEL"='a' and sb.sid=tg.sid
    and     sg.gid=tg.gid and sg.upn=s.upn
    and     (sb.subject ='Biology' or sb.subject='Chemistry'));
    The subquery
    select avg(g.value)
    from    comqdhb.gradevalues@glink g
    ,         comqdhb.subject@glink sb
    ,         comqdhb.studentingroup@glink sg
    ,         comqdhb.teachinggroup@glink tg
    ,         comqdhb.student@glink s
    ,         average_gcse gc
    where g.grade=sg.grade 
    and     gc.avg_gcse between 6.5 and 7
    and     gc.upn=s.upn
    and     g."LEVEL"='a' and sb.sid=tg.sid
    and     sg.gid=tg.gid and sg.upn=s.upn
    and     (sb.subject ='Biology' or sb.subject='Chemistry')
    Returns
    78.88
    In the main query
    select   g.grade from comqdhb.gradevalues@glink g
    where  g.value > 78.8
    g.Value has values such as
    120
    100
    80
    60
    40
    20
    78.8 is close to 80, only 80 must be taken and the corresponding grade will be displayed.

    What is the function to do so.

    I just put > and it displays
    120 A
    100 B
    80 C

    But the ABC should not be visible only C must be taken

    y at - it no fuction as neighbors, cant use between

    Please help, thank you.

    Rider wrote:
    y at - it no fuction as neighbors, cant use between

    The MIN function maybe aggregation?

    select   min(g.grade) from comqdhb.gradevalues@glink g ...
    

    Kind regards
    Rob.

  • Case returns the error on the value of type (error-17308)

    Hello

    I have the following problem with TestStand: I use a sequence setting tension on an instrument. The first step in this sequence is to choose the instrument to define. It worked absolutely fine so far. Next, I added a tool to select (called 2602A here). Now, it always works for all instruments, but not for this one. I also tested the Select / Case regardless, he does the same. The error message indicates that the type of my value does not match the type expexted. Yet, the type, as defined in the parameters.instrument is good (see attached photo). I tried with/without reference: same behavior. I tried with/without check Type: same behavior.

    Maybe I can specify that my instrument works very well, I tested the list of instructions under the indendently step case, without any difficulty.

    Any idea? Thank you in advance.

    TestStand:

    TS engine f1 2010 SP1 (4.5.1.144)

    4.5.1.134 sequence editor

    LabVIEW:

    Version 11.0.1f2

    Hello

    Looks like you do a comparison in the "select" for a string type as seen by the value, but the setting for the case is an assessment rather than a string of values to compare to and I can not make sense since he's looking for a game (chained a ternary operator) or returns - 1 - making in this case doesn't make no sense - do in the select to return whereby cases to go.

    The step case type is more than a 1:1 comparison, however, you have already demonstrated, the case itself may be an expression - you must ensure that the expression is returned exactly the correct type, so-1 is not valid, but would be "-1".

    Who is?

    So I tried to replicate this - if I send a pure (as in "2604" string) number when I'm looking for Parameters.Instrument == "2604 A '? '" 2604 A': Parameters.Instrument == "2604 B"? "" 2604B ':-1

    He then drops the default case.

    If I switch 2604 'B' which then activates OK.

    If I pass in "fred" which fails with the error since we were looking for - 1 because it is a number, it does not work.

    If I replace the case expression with:

    Parameters.Instrument == "2604 A '? '" 2604 A': Parameters.Instrument == "2604 B"? "" 2604-B ":"2604 A.

    While expression first only returns a string, so you'll get to the channel currently selected string comparison AND if I get A 2604 or 2604 B then I get a return value that corresponds to the string passed, or get a string that does not match, so the case is not the right one.

    So Don't pass return - 1 = return pass which is valid for this case, but do not match the incoming parameter.

    Thank you

    Sacha

  • How can I make the comparison of the two string one by one

    Hi all

    I'm new in labview and I'm stuck with the problem.

    I have a huge text with a different pressure values in different ports. My goal is to find the average value of the two ports and the dP and this value, I need to find the max value of dP.For that please see the attached VI. and see the structure 1st case of this home VI. This I already have.

    [I first hypothesis structure I compare the port 103 and 115]

    Now that I was for 2 ports and now I want to do a calculation for the comparison of the two ports but labview should do automatically, for reference, I have attached the text file.

    [Now, I want to compare 103 & 115 104 & 116, 105 & 117 automatically a]

    Please see the nd structure 2 for that. (in the first case structure I put table 1 d of search function to find the location of the port column but I manually write the "103" Port, now I want the labview automatically read the port of 103, on port 104 and calculate the average)

    He would be grateful if you can help me.

    I press the run button and push the button highlight to see execution. And I found something wrong.

    In the second element of research case structure function read the location of the column, but after identyfied the number of the column, the message not to the upper structure and the calculation has not started. Computing began when he reads the element and passes the final item column, then the calculation started...

  • Increment the value of the control programmatically, strange result

    I have a problem with this VI.
    I did it with LV 2009.
    There is an auxiliary VI that I use to remove the reference to a control programmatically.
    The test.vi (main) tries to set increment to a digital-digital control programmatically.
    With the help of the 'heap of ctrl VI', it is possible to do all the code in a single case of big event.

    If you change multiplier 'n'--> he grabs value 'n', for N = 1, 2, 3,..., 7
    It takes the value of N the multiplier and checks if it is == 1. Then the value increment of the N value accordingly.

    Problem:
    It does not work as expected.
    If you explore the thread, it's all good until the equal check, I don't understand why it does not work.

    Thanks for your advice.
    Greetings

    The problem is probably not full equality of types of data comparison.  As fractions like 0.1 cannot be represented exactly in binary, is often equal to comparisons result in numbers that appear to be equal when displayed with one decimal place are actually different in the 14th, 15th or 16th place.

    Use a rough comparison: is the absolute value of the difference of less than 10 ^-14?

    Lynn

  • Change the value of always the same as the previous value register

    Hi all. I was banging my head against the wall for a while on it and hoping that someone can help me.

    I use a USB-6008 DAQ hardware to read a rotary encoder. I pulled the rudiments of the attached VI of the forums, but I modified to work with an encoder with an index. All I'm doing is reset to the "value of the degrees to zero whenever the value of the counter (Encoder index) increases a. I thought I was good at using the shift register, since it must retain the value of the previous iteration (just before the index spent). The problem I have is that two courses to the function values ' lower to "always seem to be the same, so my 'degrees' value never resets. What Miss me?

    Thank you!

    PS - I need to use the meter (instead of just another digital line) because it is essential that the index value is never missed. And I know using a software based counter as this tends to miss a digital input signal here and there.

    Suppose that your encoder runs at 1 rpm = 1 index pulse per second. You are turning your loop to 1000 times per second. It is not clear that the 6008 reads the line of DI and the meter that fast. The software update timed AO rate is 150 Hz, maximum. If it reads fast, get you 999 readings of 0 and a reading of 1. For 1 millisecond the degrees indicator will display 0.  On the next iteration of the loop of the< comparison="" will="" be="" true="" again="" and="" the="" shift="" register="" value="" will="" be="" displayed="" again.=""  what="" you="" need="" to="" do="" is="" to="" reset="" the="" value="" going="" into="" the="" count="" register="" to="" zero,="" not="" the="" display.=""  one="" simple="" wiring="" change="" should="" fix="">

    Lynn

  • read the values of an array element and by sending a digital output to a designated channel according to the value read from the table

    Hello world

    could someone help me before I get out of my hair. Here's my problem.

    I read 3 values of an array of 3 elements i.e. 1,2,3. These values are then compared to a constant value, example if the first element of the array is 1 and it meets the comparison condition can send a digital camera of output for that channel on data acquisition

    I want to be able to send a value from a table to its corresponding comparison and then on its designated channel on the acquisition of data, the whole point of this is due to the fact the table element will not always read the value 1,2,3 for example could be 2,3,1

    Here's one the vi I have so far

    If someone could help it would be much appreciated

    all the best

    brand

    Take time to explore the many examples included with LabVIEW that cover the basics.

    -Indexing table

    -reading a spreadsheet file

  • How to check the value of Disqualification working correctly?

    Hello

    I have problems using the processor to check the value in Disqualification. I want to check the customer name field for how many names contain 'TEST' in them. Here are the steps I follow, I hope that someone can identify where I'm wrong:

    1. Add checking the value

    2. in the ATTRIBUTES tab, add "Customer Name" as the field of Validation

    3. in the OPTIONS tab, add 'TEST' as against value to compare files, choose "is equal to", as the comparison operator, select 'Yes' to Ignore Case.

    In reviewing the data, I see many instances where TEST is in the name of customer - but the value record tells me that there is no example of this.

    Have I missed something obvious/fast?

    Thank you!

    Checking the value does not have a check Contains. Use the list check with the Contains option for this.

    You can press F1 on each processor for its help page if you are not sure about what he does.

    Mike

  • Block Oracle's PL/SQL by comparing the values to 4 decimal places

    Hello

    I use Oracle Database 11 g 2. I wrote a simple PL/SQL block that validates as false. Basically trying to ensure that the calculation of FX's 4 correct decimals.

    Example if,

    1,000 vs 1.0000 should have the value false

    1,0000 vs 1.0000 must be set to true

    To this end, I'm doing string comparison. I don't know why the following code evaluates to "false", or what is the right way to make this comparison in PL/SQL?

    declare
    l_fx_rate varchar2(100) := to_char(1, '9999.9999');
    l_aud_usd varchar2(100) := to_char((23/23),'999999.9999');
    
    
    BEGIN
    htp.p(l_fx_rate);
    htp.p(l_aud_usd);
      IF l_fx_rate = l_aud_usd
      THEN
    htp.p('true');
      else
    htp.p('false');
      END IF;
    END;
    

    Thank you.

    • l_fx_rate varchar2 (100): = to_char (1, '9999.9999');
    • l_aud_usd varchar2 (100): = to_char ((23/23), '999999.9999');

    The first STRING has 4 digits left of the decimal separator and the second CHANNEL has 6 digits to the left of the decimal separator.

    4 is NOT equal 6.

    You can EASILY see if you actually view the values that uses Oracle.

    with q as (select to_char (1, '9999.9999'), v1, v2 to_char ((23/23), '999999.9999') of double)
    Select the v1, v2, dump (v1), (v2) dump, case when v1 = v2 then "true" end if 'false' q v3

    V1 (V1), V2, DUMP DUMP (V2), V3

    1.0000, Typ = 1 Len = 10: 32,32,32,32,49,46,48,48,48,48, 1.0000, Typ = 1 Len = 12: 32,32,32,32,32,32,49,46,48,48,48,48, false

    See the 4 space characters (32,32,32,32) in the first value chain? See the 6 in the second value?

    Oracle compares "1.0000' to ' 1.0000' and the strings are NOT the same."

  • Enter the value in the vmx file

    Hi all

    Thanks in advance.

    I'm not a programmer, so this may be a stupid question.

    I use the attached script for the curing of a virtual machine. Where the script we dipped all virtual machines running in the host. But I want to do it in one or two virtual machines. I modified the script and try to pass my name to VMS. But no luck and scripts cannot add value. Please suggest how to do it for an individual virtual machines.


    # Get all vm not including models
    #$VMs = ViewGet - ViewType - VirtualMachine-name of the property - filter @{"Config.Template"="false"}

    ##############################

    # Modified by me

    $VMs = read - host "name of the virtual machine.

    Get - vm $VMs

    $vms. ReconfigVM_Task ($vmConfigSpec)

    ##############################
    # Do!
    {foreach ($vm to $vms)
    $vm. ReconfigVM_Task ($vmConfigSpec) do!
    {foreach ($vm to $vms)
    $vm. ReconfigVM_Task ($vmConfigSpec)
    }

    Concerning

    SIV

    That last part might be

    $VMname= Read-host "VM Name" $VMs = Get-View -ViewType VirtualMachine -Property Name -Filter @{"Name"=$VMname;"Config.Template"="false"}
    foreach($vm in $VMs{
        $vm.ReconfigVM_Task($vmConfigSpec)
    }
    

    Request a virtual machine name and who to put in the filter Get-View.

    Be careful with the comparison in the filter, if you provide a name like "VM", also machines as VM1, VM100... will be returned

Maybe you are looking for