Comparison of two number

1. I have ot make a VI for verification nuumber two if equal, greater or lesser.
2 attached is VI.
3. If the numbers are equal then print zero, if one is greater than 1, if its less print 2.
4. I do not understand how to do it. When I put the output of three to digital output then its error, because we cannot do.

Vindhyachal.Takniki wrote:

@johnsold, how to do this. I have attached a VI. When a place a table it appears on the façade also, I did not play. On the front, there will be two number & an output.

Build table allows you to create a table of Boolean in your results of the comparison, then Boolean table number to obtain a corresponding number.  You can then wire this result number in the selector of the case.

Tags: NI Software

Similar Questions

  • synchronize two number of cycles

    Hello world!

    I want to synchronize two number of cycles. I want two number of cycles to start the countdown together. I have two check County file VI, which was attached. I would like to ask if two ticks start at the same time counting.

    I thank in advance.

    In LV, you don't 'start' a number of cycles. The counter tick count functions interact with which is a 32-bit counter that starts when the fact of LV. You can compare the number in two places in your code, and can be assured that they are both reading from the same starting point.

    But I am totally confused by your code. What you trying to do?

    Mike...

  • store the procedure to calculate LCM and gcd of the two number

    Hello
    Can someone please help me write this procedure


    -to calculate LCM and gcd of the two number




    Thank you
    Madam.

    Well, you want, because you did not explain what you mean by LCM and gcd, so it doesn't have such a function.

    I assume you mean smallest common Multiple and more common denominator she mathematical terms.

    GCD can be developed...

    SQL> ed
    Wrote file afiedt.buf
    
      1  create or replace function gcd(num1 in number, num2 in number) return number is
      2    v_n1 number := greatest(num1,num2);
      3    v_n2 number := least(num1,num2);
      4    v_r  number := -1;
      5    v_d  number := 0;
      6  begin
      7    loop
      8      exit when v_r = 0;
      9      v_r := v_n1 - (trunc(v_n1 / v_n2)*v_n2);
     10      v_d := v_n2;
     11      v_n1 := v_n2;
     12      v_n2 := v_r;
     13    end loop;
     14    return v_d;
     15* end;
    SQL> /
    
    Function created.
    
    SQL> select gcd(60,40) from dual;
    
    GCD(60,40)
    ----------
            20
    
    SQL> select gcd(64,40) from dual;
    
    GCD(64,40)
    ----------
             8
    
    SQL>
    

    Why not have a go at LCM yourself...

    http://www.idomaths.com/hcflcm.php

  • Comparison between two tables

    Hello

    I have two tables USERS and LISTS:

    And I want that there is a comparison between these two tables executed when user table USERS connect to the application.

    They must compare the columns between the SEXES and AGE and if some users have the same attributes in its ranks as in a line in the table LISTS (here is unique each line) so that the user gets in his line in the column 'LIST_ID' the ID of the line with which attributes between GENDER and AGE.

    Example:

    USERS TABLE: exampleuser | Boby | McGrahem | Male | 18. -------

    LISTS OF TABLE: 28 | examplelist | Male | 18

    Once the Login of the user Boby gets in its ranks the ID = 28 because the SEX and AGE corresponds to the row of table LIST:

    Result:

    USERS TABLE: exampleuser | Boby | McGrahem | Male | 18. 28

    
    CREATE TABLE  "USERS" 
       (    "USERNAME" VARCHAR2(15) NOT NULL ENABLE, 
            "FORRNAME" VARCHAR2(15) NOT NULL ENABLE,                  
            "SURNAME" VARCHAR2(15) NOT NULL ENABLE, 
            "GENDER" VARCHAR2(10) NOT NULL ENABLE,   
            "AGE" NUMBER, 
            "LIST_ID" NUMBER, 
             CONSTRAINT " USERS_PK" PRIMARY KEY ("USERNAME")
      USING INDEX  ENABLE
    
    

    CREATE TABLE  "LISTS" 
       (    " LIST_ID" NUMBER NOT NULL ENABLE, 
            " LISTNAME" VARCHAR2(50) NOT NULL ENABLE, 
            "GENDER" VARCHAR2(10) NOT NULL ENABLE, 
            "AGE" VARCHAR2(3) NOT NULL ENABLE,  
             CONSTRAINT " LISTS_PK" PRIMARY KEY ("LIST_ID")
      USING INDEX  ENABLE
       
    

    I need help for coding this, if someone be so good.

    This is my essay:


    DECLARE  
        v_listid varchar2(100);   
        BEGIN  
          
        SELECT  LIST_ID into v_listgid
         FROM LISTS
         WHERE GENDER = (SELECT GENDER
                              FROM USERS 
                            WHERE UPPER(TRIM(USERNAME)) = UPPER(TRIM(:APP_USER)))
         AND AGE = (SELECT AGE
                              FROM USERS  
                            WHERE UPPER(TRIM(USERNAME)) = UPPER(TRIM(:APP_USER)));
    
         UPDATE USERS   
        SET LIST_ID =  v_listid   WHERE UPPER(TRIM(USERNAME)) = UPPER(TRIM(:APP_USER));  
      
        END;
    

    I'd like to REALLY shy away using the USER name as the primary key, because the fact that users can create duplicate user names... YOU should NEVER base a PK on the entry of user, the better to let the database create and maintain this element of date...

    FIX:

    UPDATE to users U

    SET List_Id = (SELECT List_Id OF lists L WHERE L.Gender = U.Gender and L.SOMENUMBER = U.SOMENUMBER) AND

    Upper (U.UserName) = UPPER(:APP_USER);

    Don't really want to cut the strings, Oracle which will do since they are of type varchar2 columns...

    Thank you

    Tony Miller
    Software LuvMuffin
    Ruckersville, WILL

  • Comparison between two inputs

    Hello

    I am a beginner absolut for LabView and I learned LV tutorials, but I have a question and need your help.

    I have two digital inputs and one digital output and I want to output for example as many entries. What I need is how to compare two entry and decide for one of them.

    When I use a comparison operator as equal or smaller, I get a Boolean result but not a numeric. How can I use this to get for example the bigger or smaller?

    Thank you

    Oliver

    For example, you can use your superior decide who is actually higher then select this one through a structure of matter or a Select who will send you one to forward more great.

    That functionality is already attached to the Min/Max function, check it out.

    /Y

  • Comparison of two values Datetime, but only the part of everyone's schedule

    Hello. I have two Datetime objects on my form. Both are formatted and only display the HH:MIPM. I have a validation requirement where I have to check if: TimeA is higher (: TimeB - 30 minutes). What would be the best way to build an IF condition allows to assess both these Datetime variables and determines if the time portion to: TimeA is greater than the time portion of: TimeB - 30 minutes? The part 'date' Datetime value should not be taken into account in the comparison.

    Any help would be greatly appreciated.

    Published by: Buechler on April 13, 2010 10:43

    If you really want to ignore the date and to assess the time, I would like to convert it each date to CHAR formatted as time column and convert it back dated to essentially match the date part. You can then perform a calculation of standard date to get the time difference and check if the difference is more than 30 minutes. For example:

    DECLARE
       TIME_B  DATE := To_Date(To_Char(:DATA_BLOCK.TIME_B,'HH24:MI:SS'),'HH24:MI:SS');
       TIME_A  DATE := To_Date(To_Char(:DATA_BLOCK.TIME_A,'HH24:MI:SS'),'HH24:MI:SS');
    BEGIN
       IF ( ABS(TIME_B  - TIME_A) > .021 ) THEN
          /* If you divide 30/1440 you get the numeric equivilent of 30 minutes. (.021) */
          -- Differnece is greater than 30 minutes!
          -- Do Something Here....
       ELSE
          -- Difference is LESS than 30 minutes!
          -- Do Something here....
       END IF;
    END;
    

    I hope this helps.
    Craig...

  • Comparison of two documents

    I compare two documents and I can see the differences, but there is a progress screen that stays on top and doesn't seem to end. Any ideas?

    Use of Adobe Acrobat Pro 8.1 Windows DC

    Compare pdf.JPG

    My solution has been to save the file and open it again.

  • Comparison of two tables

    Hi all

    Employee table should accept the definition name and column of file while EMP_temp must accept the column definition only.

    Should compare employee and EMP_TEMP

    CREATE TABLE employee
    (INPUT_FILE VARCHAR2 (100 BYTE),
    COLUMN_DEFINITION VARCHAR2 (4000 BYTES)
    )


    CREATE TABLE EMP_TEMP
    (COLUMN_DEFINITION VARCHAR2 (4000 BYTE)
    )


    INSERT INTO employee VALUES ('EMP_Sets.csv ',' emp_Id dept_ID; sal");

    INSERT INTO EMP_TEMP VALUES

    (emp_id, dept_id, first_name, last_name, sal);


    power required:

    Number of columns in the Employee table:

    Number of columns in the input file


    Can anyone suggest me.

    Thanks in advance
  • Error in the comparison of two numbers

    Hello

    I have the columns value_from and value_to both are number data type.

    I check if level_value_from is greater than level_value_to, I need to throw an exception.

    To do this, I wrote below, his mistake by giving the code. Can someone suggest me please a simple logic.



    String Level1Frm = pageContext.getParameter ("Level1From");
    String Level1To = pageContext.getParameter ("Level1To");

    If ((null! = Level1Frm) & & (null! = Level1To) & & (""! ")) = Level1Frm) & & (""! ") = Level1To))
    {

    Number of numLevel1Frm = new number (Level1Frm);
    Number of numLevel1To = new number (Level1To);
    }
    If (numLevel1Frm < numLevel1To)
    {
    throw new OAException ("is superior To", OAException.ERROR);
    }
    }

    This is in error, can someone help me how to solve this problem?


    Thank you
    Mahesh

    It works:
    If (pageContext.getParameter ("compare")! = null)
    {
    String s1 = pageContext.getParameter ("num");
    String s2 = pageContext.getParameter ("num1");
    Number n1 = null;
    Number n2 = null;
    try {}
    N1 = new Number (s1);
    N2 = new Number (s2);
    } catch (System.Exception e)
    {
    e.printStackTrace ();
    }
    If (N1.intValue () > n2.intValue ())
    {
    throw new OAException ("num1 > num2", OAException.ERROR);
    } else
    {
    throw new OAException ("num2 > = num1", OAException.ERROR);
    }
    }

  • Value of aggrigate of procedure - Get Oracle on the comparison of two-column based

    Hi all
    I've written a procedure that accepts an input parameter and returns a refcursor.
    The logic used in the procedure is:
    The procedure is used to display the summary and the report in detail. When the input parameter has more than one saperated comma then it will act as a synthesis report, and when there is just a value as input, then it will act like a detailed report.
    The input parameter is as "AA12345, BB45434, HJ89736," the first two characters is Brand_id and the rest of the 5 character is the propery_id.
    The aggrigation of aggrigation query is:
    Select Month_name, Year, sum (REVPAR), Sum (ADR) in the FIS_KPI_TREND where
    Brand_id = 'AA' and SIte_id = '12345' Month_name group, year;
    The above query will worke fine for detail report when there is just a value for the entry as 'AA12345 '.

    The problem is coming to the summary report when I need to get the value of aggrigated for all the brand and the site which is entered in the input parameter.
    So I changed the query in the form:
    Select Month_name, Year, sum (REVPAR), Sum (ADR) in the FIS_KPI_TREND where
    Brand_id | SIte_id in ('AA12345', 'BB45434', 'HJ89736') of the Group of Month_name, year;
    (I use parser function to parse a comma saperated values.)

    By doing this, I get the desired result, but the performance has decrised that the Index is based on Brand_id and Site_id but I'm using Brand_ID | Site_id for my research.

    The one you suggest another way to rewrite this query so that it can take the index and not give me the output of sesired.

    Database used: Oracle 10 g

    Thanks in advance.
    Sumit Narayan

    Published by: Sumit Narayan, 11 April 2010 22:00

    I'd be inclined to do something like that to analyze the list separated by commas, that allows you to join without the concatenation of the columns as you do now.

    ME_XE?select
      substr(column_value, 1, 2)            as brand_id,
      substr(column_value, 3, length(column_value))   as site_id
    from table(sys.ODCIVARCHAR2LIST('AA12345','BB45434','HJ89736'));
      2    3    4
    BRAND_ID   SITE_ID
    ---------- ----------
    AA         12345
    BB         45434
    HJ         89736
    
    3 rows selected.
    
    Elapsed: 00:00:00.20
    ME_XE?
    
    ME_XE?select * from v$version;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE  10.2.0.1.0  Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    
    5 rows selected.
    
    Elapsed: 00:00:00.39
    ME_XE?
    

    So for your case...

    Select
      f.Month_name,
      f.Year,
      sum(f.REVPAR),
      Sum(f.ADR)
    from FIS_KPI_TREND f, table(sys.ODCIVARCHAR2LIST('AA12345','BB45434','HJ89736')) t
    where f.Brand_id = t.brand_id
    and   f.SIte_id  = t.site_id
    group by f.Month_name, f.Year;
    

    Published by: Tubby 11 April 2010 22:12

  • SQL to do a similar comparison against two concatenated columns...

    I'm doing a similar search against two columns that contain a first name, but people could touch as "John Doe"

    Can I do a similar search against concatenated columns?

    Kinda what I want to do...


    Select * FROM worker_view WHERE
    (LOWER (E.USUALFIRSTNAME) |) ' ' || Lower (E.LastName)) LIKE '% searchstring % '.


    ... but of course this isn't true... any direction would be appreciated!

    Let's take your example as test case

    First name: John
    First name: Doe

    Channel search possibilities:

    'John'
    'Doe'
    'John Doe'
    'Doe John'
    

    SQL statement:

    SELECT *
    FROM   worker_view
    WHERE  LOWER(E.USUALFIRSTNAME) LIKE LOWER('%searchstring%')
    OR     LOWER(E.LASTNAME) LIKE LOWER('%searchstring%')
    OR     LOWER(E.USUALFIRSTNAME) || ' ' || LOWER(E.LASTNAME) LOWER('%searchstring%')
    OR     LOWER(E.LASTNAME) || ' ' || LOWER(E.USUALFIRSTNAME) LOWER('%searchstring%')
    

    We'd still miss that follows:

    'JohnDoe'
    'DoeJohn'
    'John  Doe'
    'Doe  John'
    

    Hope that should be fine with your application.

    -dkv

  • No sequences present in the comparison of two models of auto-increment columns and triggers

    Hi, I'm using Oracle SQL Developer Data Modeler version 4.0.3 and I get the same behavior described in the discussion 9876135.

    Y at - it an update on this issue?

    Thank you

    Hello

    No DOF preview is currently generated differences in properties on the auto-increment columns properties page.

    However, if you create a sequence with the relevant name (and the user as appropriate) in your physical model Oracle, then its properties will be used instead of the ones on the page Auto Increment, and in this case the DOF preview will include the DDL for changes in its properties, e.g.

    FALL OF SEQUENCE "TABLE_1_SEQ".

    ;

    CREATE SEQUENCES "TABLE_1_SEQ."

    START WITH 5

    INCREMENT OF 10

    ;

    If only the increment "by" is changed, an ALTER SEQUENCE will be generated:

    CHANGE THE SEQUENCE "TABLE_1_SEQ".

    INCREMENT OF 10

    ;

    David

  • Comparison of two CSV s to eliminate unused VDIs

    Hello

    I currently have a script running in my environment that returns a list of users allowed to VDI and their last connection time.  I then a manual process in which I line up with the VDI logon names the user was logged in so that I can remove all of them.  I would like to automate this process by using a script.

    The first script creates a .csv in the following format:

    VDIPool, user, status, LastLogon

    CorpW764QA-DT, User1, active, 20/07/2013-08:46

    CorpW764QA-DT, User2, people with disabilities, 02/09/2013-16:39

    CorpW764QA-DT, user3, active, 20/09/2013-19:06

    Unfortunately, this .csv file does not include the names of the VDIs registered users in.  I would like to compare this list to the csv that I get from VDI administrator when I right click and the content of the export that Table I can get a list of unused VDIs, I can delete.  Here is the output of the webpage administrator VDI (Desktop tab + right click-> export table contents):

    Desktop computer, pool, name DNS, Version, data store, User Agent, host, status

    Desktop1,CorpW7QA-DT,Desktop1.mydomain.local,mydomain.local\User1,esxqa41yyz.mydomain.local,4.5.0,[Store1],remote,available

    Desktop2,CorpW7QA-DT,desktop2.mydomain.local,mydomain.local\User2,esxqa43yyz.mydomain.local,4.5.0,[Store1],remote,available

    Desktop3,CorpW7QA-DT,desktop3.mydomain.local,mydomain.local\User3,esxqa72yyz.mydomain.local,unknown,[Store1],remote,available

    Match the output of the 1st .csv upward with the names of desktop provides in the 2nd .csv?  My final goal is to identify all the VDIs which are provided to users who are not logged in them a lot of time so that I can remove them.

    Thank you!

    Try something like this

    $stations = import-Csv.\vdistations.csv - UseCulture

    $logons = import-Csv.\vdilogons.csv - UseCulture

    $notUsed = @)

    {foreach ($vdi to $stations)

    $vdiUser = $logons | where {$_.} User - eq $vdi. {User.Split('\') [1]}

    {if(!$vdiUser)}

    $notUsed += $vdi

    }

    }

    $notUsed

  • Comparison of two collection objects

    Hi all

    I need to compare 2 lists of e-mail addresses and eliminate common e-mail found in both lists.

    Issues, it is each list contains more than 300,000 e-mail addresses. Is it possible to store values of this size in collectibles (for example, 'Set')?
    What is the best way to do this?

    Thanks in advance!

    user3578038 wrote:
    Issues, it is each list contains more than 300,000 e-mail addresses. Is it possible to store values of this size in collectibles (for example, 'Set')?

    If you have the memory, of course.

    What is the best way to do this?

    I do it with the standard unix commands, concatenate lists and sort / uniq on it.

    You are a spammer (or a spammer aspiring) or why do you 300 000 email addresses?

  • By comparing the two registers of the transaction system

    I would like to comment on a matter of data modeling. In our source siebel system, our business users would like a metric that is based on the comparison of two requests for service. Essentially, if the second service request is created 7 or fewer days after the first application service, then it is reported as a reminder. Common element used for this comparison, it is that they both have the same associated assets.

    We could easily create the necessary ETL for the creation of a fact of reminder. However, my question is around to give visibility to the relationship between the two. Essentially, the business users would like that the first service request is related to the second and vice versa. How would you recommend creating this relationship in the star schema?

    For the relationship, you can for example add a column in the dimension of reminder.
    Recalls with the same value (for example the first recall) are related.

    If you want to see the reverse callback number in a one-to-one relationship, you can add another column to store.

    Concerning
    Nico

    Published by: gerardnico on 4-apr-2009 01:17

Maybe you are looking for