Conversion of binary and incoming data on a table

So I try to do 2 things:

1 generate a random number, convert it to hexadecimal format and display it on a table.

2 convert the binary hexadecimal format and display on a table as well

Just started using labview so my diagram is probably completely wrong

Look at the Format function in the chain.  You can set all kinds of formatting rules.  %x is going to take a number and format it in a Hex string.  %b is going to take a number and shaped in a binary string.  You want to use the build array function to write to your table.

Tags: NI Software

Similar Questions

  • Reading file from the ftp server and importing data into the table

    Hi experts,

    Well, basically, I text with different layout files have been uploaded to an ftp server. Now, I must write a procedure to recover these files, read and insert data into a table... what to do?

    your help would be greatly helpful.

    Thank you

    user9004152 wrote:
    http://it.Toolbox.com/wiki/index.php/Load_data_from_a_flat_file_into_an_Oracle_table

    See the link, hope it will work.

    It is an old method, using the utl_file_dir parameter that is now obsolete and which is frankly a waste of space when external tables can do exactly the same thing much more easily.

  • Insert and add data to the table to a batch file

    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE Production 11.1.0.7.0
    AMT for 32-bit Windows: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - Production


    My patch to input file looks like this:

    A0397990002000001
    A0459380377000075
    A1291115796000002
    C0483110026000080
    D0491114923000004
    A0348400660000000
    G0209111373-

    Separate columns look like this:

    A0397 990002 000001

    account amount of IDN


    I'm new to PL/SQL and having a problem changing or adding a record in a table. Don't know how to check if a record exists in the table change if not
    Insert the record.

    If the quantity is 000000 or - the record should be deleted. I have code in place to do this however, don't know how to handle change or add the part.

    Here is the code I have so far and thanks for looking:

    Set serveroutput on
    create or replace directory user_dir as 'c:\dataformats\incoming\ ';


    DECLARE


    v_filename VARCHAR2 (100); -The name of the data file
    v_file_exists boolean;
    number of v_file_length;
    number of v_block_size;
    f utl_file.file_type;
    s varchar2 (200);
    lineString varchar (200);

    -not used c_ *.
    c_account ID_REQ_STG.account%TYPE;
    c_IDN ID_REQ_STG. IDN % TYPE;
    c_quantity ID_REQ_STG.quantity%TYPE;

    ID_REQ_TUPLE ID_REQ_STG % ROWTYPE;

    v_account varchar (5);
    v_IDN varchar (6);
    V_quantity varchar (6);

    BEGIN
    v_filename: = ' PTCLICK. MANUAL.12SERIES.TXT';


    DBMS_OUTPUT. Put_line (v_filename); -the name of the file


    UTL_FILE.fgetattr ("USER_DIR", v_filename, v_file_exists, v_file_length, v_block_size);

    IF v_file_exists THEN

    dbms_output.put_line ("'File Exists");

    f: = utl_file.fopen ("USER_DIR", v_filename, "R");

    IF utl_file.is_open (f) THEN

    LOOP
    BEGIN
    UTL_FILE.get_line (f, s);
    lineString: = s;

    dbms_output.put_line (lineString);

    v_account: = substr (lineString, 1, 5);
    v_IDN: = substr (lineString, 6, 6);
    V_quantity: = substr (lineString, 12.6);


    dbms_output.put_line (v_account);
    dbms_output.put_line (v_IDN);
    dbms_output.put_line (V_quantity);

    -REMOVE

    IF v_quantity = '000000' GOLD v_quantity = '-'
    THEN
    REMOVE FROM ID_REQ_STG
    WHERE account = v_account and
    IDN = v_IDN;
    commit;
    dbms_output.put_line ('Deleted the folder' | v_account |) «and» | v_IDN);
    END IF;


    -CHANGE



    -ADD



    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    dbms_output.put_line ("' no data found");
    EXIT;
    END;

    END LOOP;

    END IF; -is open

    UTL_FILE.fclose (f);


    ON THE OTHER

    dbms_output.put_line ('file does not exist');

    END IF; -file exists

    EXCEPTION

    WHEN UTL_FILE. THEN ACCESS_DENIED
    DBMS_OUTPUT. Put_line ("' no access!");
    WHEN UTL_FILE. INVALID_PATH THEN
    DBMS_OUTPUT. PUT_LINE ('PATH DOES NOT EXIST');
    WHILE others THEN
    DBMS_OUTPUT. PUT_LINE ("SQLERRM: ' |") SQLERRM);



    END;
    /

    Hello

    Looks like a good candidate for a MERGER with an external table.

    The external table:

    create table ext_table (
     account varchar2(5),
     idn number(6),
     quantity varchar2(6)
    )
    organization external (
      type oracle_loader
      default directory user_dir
      access parameters (
        records delimited by newline
        fields (
          account position(1:5) char(5),
          idn position(6:11) char(6),
          quantity position(12:17) char(6)
        )
      )
      location ('test.txt')
    )
    reject limit unlimited;
    

    Then a simple MERGER should perform all your needs:

    MERGE INTO id_req_stg t
    USING (
     SELECT account,
            idn,
            decode(quantity, '-', 0, to_number(quantity)) as quantity
     FROM ext_table
    ) v
    ON ( t.account = v.account AND t.idn = v.idn )
    WHEN MATCHED THEN
      UPDATE SET t.quantity = v.quantity
      DELETE WHERE t.quantity = 0
    WHEN NOT MATCHED THEN
      INSERT (account, idn, quantity)
      VALUES (v.account, v.idn, v.quantity);
    

    Documentation related to the MERGER: http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/statements_9016.htm#SQLRF01606
    and on the outdoor tables: http://download.oracle.com/docs/cd/E11882_01/server.112/e10595/tables013.htm#ADMIN12896

    Published by: odie_63 on June 10, 2010 14:26 (added docs)

  • Read the BLOB and insert data into a table

    Hi all

    Let us examine below on Oracle DB 12 c:

    create table xx_test3 (c blob);
    
    insert into xx_test3 (c) values (utl_raw.cast_to_raw(
    'azertyuiop,qsdfghjklm,wxcvbn'));
    
    
    create table xx_target (col1 varchar2(50));
    
    
    
    

    Can someone guide me how to read the data and insert it into the xx_target table?

    Necessary result is:

    
    select * from xx_target;
    
    
    COL1                                              
    
    --------------------------------------------------
    azertyuiop                                        
    qsdfghjklm                                        
    wxcvbn                                            
    
    3 rows selected.
    
    
    
    
    

    Thanks in advance,

    Stoyanov.

    insert into xx_target (col1)

    with the data as)

    Select utl_raw.cast_to_varchar2 (dbms_lob.substr (c, 32000, 1)) CBC

    of xx_test3

    )

    Select regexp_substr (CBC, ' [^,] +', 1, level)

    from the data

    connect by level<= regexp_count(src,="" ',')="" +="">

  • Duplicate records and modify data in another table

    First of all, I have two tables (CUSTOMER and ADDRESS) with the following definition:

    CUSTOMER has 7 columns (aa, ab, ac, ad, ae, af, ag)

    AA is the primary key

    AE, af, ag are the duplicate columns and he should be arrested by ae, af, ag

    a foreign key between the CUSTOMER and ADDRESS

    ADDRESS has 5 columns (bb, bc, bd, aa)

    BB is the primary key

    Here is an example of the content at the start

    CUSTOMER

    AA ab ac ad ae af ag

    12 432 23 44 32 22 44

    13 32 33 213 32 22 44

    14 321 22 22 17 21 33

    15 22 43 90 17 21 33

    16 21 23 94 17 21 33

    ADDRESS

    BB bc bd be aa

    17 321 33 23 12

    18 123 32 22 13

    20 22 23 34 14

    21 22 21 22 15

    22 12 34 22 16

    And the result,

    CUSTOMER

    AA ab ac ad ae af ag

    12 432 23 44 32 22 44

    14 321 22 22 17 21 33

    ADDRESS

    BB bc bd be aa

    17 321 33 23 12

    18 123 32 22 12

    20 22 23 34 14

    21 22 21 22 14

    22 12 34 22 14

    How could I do with SQL?

    Hello

    user10681153 wrote:

    ...
    INSERT INTO CUSTOMERS VALUES (12,432,23,44,32,22,44);

    INSERT INTO CUSTOMERS VALUES (13,32,33,213,32,22,44);

    INSERT INTO CUSTOMERS VALUES (14,321,22,22,17,21,33);

    INSERT INTO CUSTOMERS VALUES (15,22,43,90,17,21,33);

    INSERT INTO CUSTOMERS VALUES (16,21,23,94,17,21,33);

    INSERT INTO THE ADDRESS VALUES (17,321,33,23,12);

    INSERT INTO THE ADDRESS VALUES (20,22,23,34,14);

    INSERT INTO THE ADDRESS VALUES (21,22,21,22,15);

    INSERT INTO THE ADDRESS VALUES (22,12,34,22,16);

    In your original message, there are 5 rows in address; now, there are only 4.  In light of these new data, I guess that the results you origianlly displayed for the customer are always the same, but the results that you want to start address are now:

    BB BC BD BE AA

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

    17 321 33 23 12

    20 22 23 34 14

    21 22 21 22 14

    22 12 34 22 14

    I don't see anything wrong with my previous solution.  Do you have?

  • Help the query to list all the days between MIN and MAX date in a table

    Hello

    Sorry, this may have already responded earlier, but I really struggled to find a previous response with the new provision of the RTO.

    In a DB 11 g, I date MIN and MAX in a table:

    {code}

    SELECT MIN (process_date) start_date, MAX (process_date) end_date FROM my_table;

    {code}

    I would get every day between these 2 dates. I mean even is there is no record in the table for a date.

    Is this possible?

    Thanks in advance,

    Olivier

    Hello

    Do you mean something like this?

    ranit@XE11GR2>> ed
    Wrote file c:\rb\1.sql
    
      1  with xx as
      2  (
      3      select
      4     to_date('05-06-2013','dd-mm-yyyy') min_d,
      5     to_date('20-06-2013','dd-mm-yyyy') max_d
      6      from dual
      7  )
      8  --
      9  -- end of test data
     10  --
     11  select
     12     min_d + level date_x
     13  from xx
     14* connect by level<=(max_d-min_d)
    ranit@XE11GR2>> /
    
    DATE_X
    -------------------
    06-06-2013 00:00:00
    07-06-2013 00:00:00
    08-06-2013 00:00:00
    09-06-2013 00:00:00
    10-06-2013 00:00:00
    11-06-2013 00:00:00
    12-06-2013 00:00:00
    13-06-2013 00:00:00
    14-06-2013 00:00:00
    15-06-2013 00:00:00
    16-06-2013 00:00:00
    17-06-2013 00:00:00
    18-06-2013 00:00:00
    19-06-2013 00:00:00
    20-06-2013 00:00:00
    
    15 rows selected.
    
  • Copy and update data from one table to the new table by using the Merge command

    Hello

    Can someone tell me please how to do this?
    I have a table: EMP (ename, sal, empno (pk), dept) another table is EMP_CLASS ((pk) empno, ename)

    I want to insert corresponding lines of emp to table emp_class if this line does'nt exists in emp_class
    otherwise it will be update info by corrsponding emp_class table as well as remove of emp_class according to the emp delete operation.






    Thank you
    Madam.

    Published by: Nico on August 12, 2010 22:59

    Have changed. PLS, run once more...

    MERGE INTO emp_class
    With the HELP of emp
    WE (emp.empno = emp_class.empno)
    WHEN MATCHED THEN
    UPDATE
    SET emp_class.ename = emp.ename,
    emp_class. DEPTNO = emp.deptno,
    emp_class. Class = decode(emp.deptno,10,1,20,2,30,3,40,4)
    DELETE
    WHERE emp_class.empno = emp.empno
    WHEN NOT MATCHED THEN
    INSERT (emp_class.empno, emp_class.name, emp_class.deptno, emp_class.class)
    VALUES (emp.empno, emp.ename, emp.deptno, decode(deptno,10,1,20,2,30,3,40,4));

    P.S. Not tested

    Thank you
    Florian...

    Published by: Florian on August 13, 2010 01:53

  • build a dynamic array to an array of 1 D of waveforms 4 graphics, including time and all data information

    Hallo!

    I tried to put entries generated in a table with the current value of the time stamp in the first column and the data of a table 1 d of waveforms of 4 cards in the other 4 columns.

    I have some difficulties to match the data in the table. I ve simulated the code I've written and I see that the time stamp but I ve got none of the values of data in my table. I want to ask you what you think of my code and how can I achieve my goal?

    Corresponding VI is attached below.

    Thanks in advance for the answer.

    I think you're looking for it.

  • assignment of data to a table problems

    Hi guys,.

    When I try to assign to a picture, I get an error.

    Here is my code when his complains

    Query = "Concat ('/ NS9:Details / NS9:ReceiptArr [', bpws:getVariableData('DebtorVar','/NS9:Details/NS9:loopArr'),']')" / >

    Query = "Concat ('/ NS9:Details / NS9:ReceiptArrBRACKET ', bpws:getVariableData('DebtorVar','/NS9:Details/NS9:loopArr'),' BRACKET')" / >

    I am assigning a data in a table.

    ReceiptArr is my table, im just trying to assign the data to the correct location. but when it works, I get the following error...

    [2009-06-26 09:40:09] "{http://schemas.oracle.com/bpel/extension} subLanguageExecutionFault" was thrown.less
    -< subLanguageExecutionFault xmlns = "http://schemas.oracle.com/bpel/extension" >
    -part name = "code" >
    < code > XPathExecutionError
    < code >
    < / part >
    -part name = "summary" >
    < Summary >
    XPath expression cannot run.
    Error when processing xpath expression, the expression is "concat ('/ ns9:Details / ns9:ReceiptArr [', bpws:getVariableData('DebtorVar','/ns9:Details/ns9:loopArr'),']') ', the reason.
    Please check the xpath query.
    < / Summary >
    < / part >
    < / subLanguageExecutionFault


    Any ideas why its failure... also is documents or websites where I can learn to access and assign data in the tables in bpel.

    Thank you

    Hello

    If you want to assign a value to a n ^ accident th of an array, you must use the pointer in brackets, such as [n], for example,.

    in the table of the books if you want to address an element called name in the n ^ th instance you should treat follows.

    Concat ([n] ns:books / ns:name, "is the name of the n ^ th book '")

    Hope this helps you.

  • Date conversion madness! String to date and vice versa

    Hello, I am working on an application targeting the OS version 4.5.x. I read a lot of messages and the links on this topic and can't seem to make the correct code.

    OK, here's the problem. I ask a timestamp date string to a server. The timestamp is the local time on the server (IS / PST etc.) and not GMT.

    My application must take time and subtract a number of days ranging from 1 day to 1 month. to get a "start" date The application must then provide the start and end date in a string format that it understands. Seems simple isn't?

    Here's the catch, however the time stamps should NOT be changed by the local what is using the device. For example, a device in Italy can contact the server located in Ottawa and ask a timestamp, the calculations shouldn't care about DST or time zone. Just take the supplied date and subtract a fixed number of days from her. Nothing more or less. This proved incredibly hard to do. first the HttpDateParser.parse (ServerTimeStamp) will be the subject of Date GMT and my problem is back to the zone specified in ServerTimeStamp.

    Thanks for any help in advance.

    My method

    public String getDAFIXMLRange (String ServerTimeStamp) {}
    String szRange;
    First analyze the incoming date and record them at the time of the last election.
    Day DAFIEndDate = new Date (HttpDateParser.parse (ServerTimeStamp));
    m_lLastPollTime = DAFIEndDate.getTime ();
            
    define the offset. Pre-programmed for simplification.
    lOffsetNumberOfSeconds long = 2 * 24 * 60 * 60;
            
          
    Calculate the start date by subtracting the offset. Multiply by 1000 to convert to milliseconds!
    Date DAFIStartDate = new Date (DAFIEndDate.getTime () - (lOffsetNumberOfSeconds * 1000));

    !!!!!!!!!!!!! HOW the DATEFORMAT OBJECT is used to get the output format ' yyyy-MM-dd' you HH: mm: "without the marker of time zone. The server knows that it is local to it. !!!!!!!!!!

    Now format the objects date as a string that includes the XML server.
    DateFormat DafiDateFormat = DateFormat.getInstance (); ' YYYY-MM-dd' you HH.

    !!!!!!!!!!!!!! THIS IS THE PART I'M CONFUSED on, with the HELP of zone to create the good date. !!!
    Time zone tz = TimeZone.getTimeZone ("IS");
    int adjEST = tz.getRawOffset ();

    Convert 'em in string format.
    String szDAFIStart = DafiDateFormat.format (DAFIStartDate);
    String szDAFIEnd = DafiDateFormat.format (DAFIEndDate);

    Replace the date calculated in the end segment ranges date XML.
    szRange = statItems.replaceAll (XML_DATERANGE, "TAGSTARTTIME", szDAFIStart);
    szRange = statItems.replaceAll (szRange, "TAGENDTIME", szDAFIEnd);
    Return szRange;
    }

    Hello

    Yes would be better if the server could provide you date to the GMT time zone, or date as a long.

    But if you can't ask the case on the server, one way might be to manually parse your string and create a new date of parameter values in a calendar, something like this

    Calendar cal = Calendar.GetInstance ();

    Cal.Set (Calendar.DAY_OF_MONTH, date)

    Cal.Set (Calendar.MONTH, month-1)

    Cal.Set (Calendar.YEAR, year);

    ' set the new time with the values, you must cal.setTime (cal.getTime ()-,...);

    and then put the date with SimpleDateFormat.

    I think that this could be a solution if you know the format string you recived that date and it won't change.

    I'm not sure but maybe it could be a solution.

    Kind regards

  • Can't do out calls and incoming calls go straight to voicemail

    Cannot do out calls and incoming calls are directed to voicemail

    See If you can not connect to a cellular or cell - data Apple Support Network.

    TT2

  • need help with hex and handling data extraction

    Hello

    I have able to transmit hexagonal commands on the serial port of my camera and receive responses in hex him successfully. I was able to confirm this by changing the display format to the spell for the control and the indicator. Now, I want to store the portion of the hexagonal received data and use it in my future orders. Example of received data as below:

    0001 1100 0010 E002 6 93 4D7E 2C4D AA66 F00D

    The red blocks will be incorporated in the next command so that when I sent this command it will look like this:

    F00D 0014 2000 0003 0000 0020 77AF E002 6 93 4D7E 2C4D

    In short, send the command and get response, extract and store data in red blocks, then send different control that contains the data that is stored. Everything is in hexadecimal format. Question is how can I extract/store the bytes wanted to and then rebuild a hex command containing these bytes? Can I convert it to normal string, byte array, or hexagonal table? If we use the latest methods of 2 conversion, I need to ensure that the zeros are not lost.

    I enclose my VI. Please take a look and help to provide a solution.

    Thanks in advance.

    Here, s what I had in mind (LabVIEW 2010):

  • EqualLogic GroupManager displays a different number of replicas, 2 outgoing and incoming 1.

    GroupManager displays a different number of replicas, 2 outgoing and incoming 1.  Is this a normal behavior?

    I raise this question to technical assistance from Dell.  They checked with their lab environment and confirmed the same behavior.  There is no functional cause whose status is displayed like this.  Two points, they said:

    (1) the number of the line leaving includes the history of replication.   It will show you an extra line in addition to the number configured in the replica set. (in my case, it's 1 (configured) + 1 (extra), so 2 total)

    (2) the number of the replica by entering the real number of replica set used for the function of data redundancy.

  • Is it possible to create a personalized card and pass data to a custom application, build in app?

    Dear all,

    I want to put in place such a device:

    Call my application by e-mail or text message app and some message (for example, the content of the message text, sender/subject or content of the email) to my own App, or just pass the id of the message to my app, and then a link between the data in my application and e-mail/text message could be created.

    We could then create a link to the text message or email of my own app.

    I'm not sure if this is possible using webworks, stunts or the native api.

    Enjoy valuable and useful or informaiton.

    Kind regards.

    Lawrence.

    Hi Laurent,.

    I don't know how you plan to have the SMS or Email app "invoke" your application?

    You can save your 'card' or 'application' with the invoke framework and it can be invoked by using Cross Cut menu screens or share, but it depends on the context of an external application invoking it. The framework to 'Share' will currently allow users to move the text to your inside the application of SMS or the e-mail application.
    But we do not send an ID of PIM message or something like that.

    Here's how you can accomplish this:

    1. create an app or card in webworks and register as a target of 'Share' here is that the documentation: http://developer.blackberry.com/html5/documentation/rim_invoke-target.html

    2. create your card capable to accept and analyze incoming data and store it, but you feel.

    I hope this helps.

  • Compress and decompress data using GZip

    Hello

    I compress and decompress data on Blackberry 8100 device using the GZip algorithm.

    I use following code:

    try {           GZIPOutputStream gCompress = null;          try {               ByteArrayOutputStream compressByte = new ByteArrayOutputStream();               gCompress = new GZIPOutputStream(compressByte,9);               gCompress.write(inputstring.getBytes());                                                //gCompress.flush();                compressedBytes = compressByte.toByteArray();               System.out.println("compressedBytes : "                     + new String(compressedBytes));             compressedString = new String(compressedBytes);                         } catch (IOException ex) {              ex.printStackTrace();           }       } catch (Exception e) {         e.printStackTrace();        }
    

    The server is unable to decompress data.

    Help, please.

    Thank you very much.

    I think you do a byte to the conversion of the string which you should not do and which may be screwing up your data.  The output of compression is not likely to be easily represented by Unicode characters and you want to transmit the bytes, so I think that is not necessary.

    This is a reformulated version of the sample in the API, which seems inaccurate, in any case: give it a try and remember that you can send the bytes, not characters.

    public static byte[] compress( byte[] data ) {
        try {
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            GZIPOutputStream gzipStream = new GZIPOutputStream( baos,
                                                                GZIPOutputStream.COMPRESSION_BEST,
                                                                GZIPOutputStream.MAX_LOG2_WINDOW_LENGTH );
            gzipStream.write( data );
            gzipStream.close();
            return baos.toByteArray();
        }
        catch(IOException ioe) {
            return null;
        }
    }
    

Maybe you are looking for