Need some tips to merge the two table-manipulation functions

Hi guys!

Thanks to Johnsold, Helmut O'Brian and Jcarmody, who helped me through a string function complicated (for me, the noob of LV), I got away with my project and I'm very close to its end.

As I've described it here I wanted to explore an array of words combined with-, i.e. C1 - C10. Help, when I arrived, I was able to do. I also learned a few things and was able to do the following:

Original array: new table:

R1                                                       R1

R2                                                       R2

C1-C3                                                  C1

K1                                                       C2

C3

K1

I have this:

Original array: new table:

R1                                                       R1

R2,R4,R7                                             R2

C1                                                       R4

K1                                                       R7

C1

K1

I was also able to combine these two functions

Now, back to my problem.

Until now, it was just a 1 d array that I worked with. In fact, it's a 2D array, I read a. CSV file:

As you can see there are a few places where things is combined with either - or by commas. I need to widen the first column as described above and as resolved in the thread I mentioned. Fact! No problem. I extracted the first column in table 1 d. Then expand it. Now, I need to replace in the original array and also expand all.

It should then look like this:

Then I only need to copy the position of the R6 line and paste it in the empty fields:

I enclose below two screws. Start by opening the main.vi. Then copy.vi. I tried to describe the problem here too. You can see what I've accomplished and what is missing.

Tasks:

1. replace the column expanded in the original array and expand all.

2 copy the needed lines.

In the main.vi, I do the 1 d expansion, but I have the problem with the expansion of table 2D. In copy.vi, I managed to copy the lines. If this part is done.

Basically, I need some advice on enlargement that I do and how do I get the 2D table also expanded. Because I have not much experience, I feel more comfortable working with 1 d arrays. But I can't seem to get any further with this 1 d-> expansion 2D.

I also really can't seem to find a smart way to implement my function of copy-line-in the main.vi.

P.S the joint screws are manufactured in LV2010.

Fortunately, I can attend some courses of basic home OR here in Norway, but so far, I'm still learning and I think that sometimes, I try to do things that are way out of my League

I don't know what I did but it works now

Thanks for the help, same!

You are even welcome!

Have attached the file if anyone wants to see what I did.

Tags: NI Software

Similar Questions

  • Need some tips on using the field

    I'm a bit of a newbie in this aspect of RoboHelp and could use some advice.  We use RoboHelp 9.0.1.262 on Windows for a Microsoft HTML project.

    Help, I work with the Basic uses of the project sensitive context help (linked pages with pop-up windows), on each page of the interface of the software (Help button) and help on the fields and the other buttons field (click on the? mark). Developers have already added using software and sent me a text string and a value digital (or hex) pay-per-view to. I wrote the help and created the text file using the field. Everything works except the help of the field.

    The sheet of cheats, drafted by the previous writer explained that you need to create a text file called < tout_nom > .txt this help in the format text:

    .topic HIDC_OPTIONS_EXAMPLE

    Sample text for the field.

    Each entry is separated by a blank line imported into the project in the folder 'what is' in the project configuration module. I created a < tout_nom > .h file and imported into the map files folder. The format is:

    #define HID_OPTIONS_EXAMPLE 0x82bd0002

    #define HIDC_BROWSE_EXAMPLE 0x82bd1b5a

    Each entry is on a new line and the text string are separated hexadecimal number by a tab. The chain and the tab I have been given by development. Once compiled, I just get 'No help on this field' when I test it against the software. What Miss me? Processes only the doc of RoboHelp with a tool to create a separate project. Is this necessary? The writer who wrote the cheat sheet has not used one with RoboHelp 7.

    Thanks in advance. I worked on getting this past few days without success.

    To finish this thread, I found the problem. Something simple that I didn't know, as you can imagine. Amoungst all the context IDs (1084 of them), there were a couple that have not been mapped. There is no place for me to look like any other program I used is quite robust not not to break completely because of something as simple. Not robohelp, apparently. Even if the IDS not mapped had nothing to do with the areas in question, they broke the What's this? help so completely that nothing worked.  I am surprised and dismayed. What a waste of time.

  • Left join of the two tables and multiple values into a single value separated by commas

    Hello

    I have following tables with their structures and their data as below.

    CREATE TABLE 'BETODI '. "" BETINFO ".

    (

    VARCHAR2 (8 BYTE) "CURRENTPRESS."

    ENABLE 'TYPEIDCONTAINER' VARCHAR2 (30 BYTE) NOT NULL

    )

    INSERT INTO Betinfo (Currentpress, typeidcontainer) VALUES ('A24G', 'PMC');

    INSERT INTO Betinfo (Currentpress, typeidcontainer) VALUES ('A24D', 'Pensky-MARTENS');

    INSERT INTO Betinfo (Currentpress, typeidcontainer) VALUES ("A25D", "CMP");

    INSERT INTO Betinfo (Currentpress, typeidcontainer) VALUES ('A25G', 'PMC');

    INSERT INTO Betinfo (Currentpress, typeidcontainer) VALUES ('A26D', 'PMC');

    INSERT INTO Betinfo (Currentpress, typeidcontainer) VALUES ('A26G', 'PMC');

    INSERT INTO Betinfo (Currentpress, typeidcontainer) VALUES ("A32G", "V-BFC3");

    INSERT INTO Betinfo (Currentpress, typeidcontainer) VALUES ('A32D', "V-BFC2");

    CREATE TABLE 'BETODI '. "" BETMASTER ".

    (

    ACTIVATE THE "CUREPRESS" TANK (5 BYTES) NOT NULL,

    ACTIVATE THE "TYPE" VARCHAR2 (5 BYTE) NOT NULL,

    NUMBER (5.0) "LASTPCIRIM".

    )

    INSERT INTO BetMaster (Curepress, type, lastpcirim) VALUES ('A24', '45 M 8', 15);

    INSERT INTO BetMaster (Curepress, type, lastpcirim) VALUES ('A25', 42 16', 15);

    INSERT INTO BetMaster (Curepress, type, lastpcirim) VALUES ("A26", 16' 45, 15);

    INSERT INTO BetMaster (Curepress, type, lastpcirim) VALUES ("A27", '45 M 34', 16);

    INSERT INTO BetMaster (Curepress, type, lastpcirim) VALUES ('A28', '45 M 34', 16);

    INSERT INTO BetMaster (Curepress, type, lastpcirim) VALUES ('A29', '45 M 34', 16);

    INSERT INTO BetMaster (Curepress, type, lastpcirim) VALUES ('A30', '45MCH', 15);

    INSERT INTO BetMaster (Curepress, type, lastpcirim) VALUES ("A31", "45MCH", 16);

    INSERT INTO BetMaster (Curepress, type, lastpcirim) VALUES ('A32', '45MCH', 16);

    INSERT INTO BetMaster (Curepress, type, lastpcirim) VALUES ('A33', '45MCH', 16);

    INSERT INTO BetMaster (Curepress, type, lastpcirim) VALUES ("A34", "45MCH", 16);

    These two tables have left join as

    BETMASTER. CUREPRESS = substr (BETINFO. CURRENTPRESS, 1, 3)

    now I want to have the data in the two tables with fields Curepress, Lastpcirim, typeidcontainer.

    Also something like

    Make a group of typeidcontainer if this value is greater than 1 by press separated the values of semicolon (;)

    So, for example above, we should be given as

    A24 PMC 15; PENSKY-MARTENS

    A25 15 PMC

    A26 15 PMC

    A27 16 (NULL)

    A28 16 (NULL)

    A30 15 (NULL)

    A31 16 (NULL)

    A32 16 BFC2-V; V BFC3

    A33 16 (NULL)

    A34 16 (NULL)

    How could do?

    My current request is as

    Select distinct Curepress, lastpcirim, typeidcontainer

    BETMASTER STD left join INF BETINFO

    on the trim (STD. CUREPRESS) = substr (trim (INF. CURRENTPRESS), 1, 3)

    but I am unable to get the values separated by commas.

    Any help would be appreciated.

    Thank you

    Mahesh.

    Hi, Mahesh,

    If you want to only 1 row of output for each distinct combination of currentpress and lastpcirim?  This sounds like a job for GROUP BY.

    And you want the row to contain a list of all different typidcontainers-delimited?  This sounds like a job for the aggregate LISTAGG function.

    WITH joined_data AS

    (

    SELECT DISTINCT

    MST.curepress, mst.lastpcirim, inf.typeidcontainer

    OF betmaster STD

    LEFT JOIN betinfo ON TRIM (mst.curepress) inf = SUBSTR (TRIM (inf.currentpress)

    1

    3

    )

    )

    SELECT curepress, lastpcirim

    LISTAGG (typeidcontainer, ',')

    THE Group (ORDER BY typeidcontainer) AS container_list

    OF joined_data

    Curepress GROUP, lastpcirim

    ;

    Unfortunately, you can't say LISTAGG (DISTINCT ...), so you should always get the separate containers how you already are.  (Note that the subquery is just what you posted).

    Thanks for posting the CREATE TABLE and INSERT statements; It is very useful.  Don't forget to tell what version of Oracle you are using.  LISTAGG was new in Oracle 11.2.

    Why not add CHECK constraints (and perhaps triggers) to your tables, so that curepress and currentpress are not stored with the head or trailing spaces?  Then you wouldn't need to use the PAD in queries like this, and your code would be simpler and more effective.

  • Comparing the sum of the two tables and correct by difference of amount in its second t

    Hello guys,.

    I have a very difficult task that I can't get my head around.
    The sample data looks like this:

    Master table
    Request - booking - debit - credit - MasterAmout
    1------------1----------------D---------------------------------15.3
    1------------2----------------D---------------------------------480.6
    1------------3------------------------------C-------------------496.8
    ------------------------------------------- 0.9


    The slave table
    Demande---reservation---debit---credit---slaveamout---slavecorrection
    1------------1------------D------------------------------------15.3---------------14.5
    1------------2------------D------------------------------------480.6-------------480.6
    1------------3-----------------------------C-------------------496---------------496
    -------------------------------------------0.1--------------------------------------0.9


    The reservation have a total amount of 0.1, but must be corrected to 0.9 because the main table has 0.9.

    Reservation 1 requires a correction so the slave table also has a total of 0.9 (business rule is, only corrections on the first booking). So we have
    to change the amount of 15.3 to 14.5. I plan my SQL like this:

    1 reservations sum of two tables for each claim. Compare the two for each individual claim.
    2. If Captain sum the amount shows a difference between master / slave
    2.1 select top 1 table reservation slave for the specific claim and increase/decrease by the difference of these two amounts.

    Who is?

    Hello

    Use MERGE to actually do the UPDATE.
    The ROW_NUMBER analytic function to identify the first booking in slave (unless you can count on which the reservation = 1).

    MERGE INTO     slave     dst
    USING     (
         WITH     master_summary     AS
         (
              SELECT       claim
              ,       SUM ( master_ampount * CASE
                                       WHEN  debit  = 'D'  THEN -1
                                       WHEN  credit = 'C'  THEN  1
                                   END
                         )     AS balance
              FROM       master
              GROUP BY  claim
         )
         SELECT     s.claim
         ,     s.booking
         ,     SUM ( s.slave_amount * CASE
                                WHEN  s.debit  = 'D'  THEN -1
                                WHEN  s.credit = 'C'  THEN  1
                               END
                  ) OVER (PARTITION BY  claim) - m.balance     AS diff
         ,     ROW_NUMBER () OVER ( PARTITION BY  claim
                             ORDER BY        booking
                           )     AS r_num
         FROM     master_summary     m
         JOIN     slave          s  ON     m.claim     = s.claim
         )          src
    ON     (     src.claim     = dst.claim
         AND     src.r_num     = 1
         )
    WHEN MATCHED THEN UPDATE
    SET     dst.debit      = CASE
                        WHEN src.diff      <  0 THEN 'D'
                                       ELSE NULL
                     END
    ,     dst.credit      = CASE
                        WHEN src.diff      <  0 THEN NULL
                                       ELSE 'C'
                     END
    ,     dst.slaveamount = ABS (src.diff)
    ;
    

    If you would care to CREATE TABLE and INSERT statements for the sample data (showing the two tables, as they exist before the DML) then I could test this.

    The design of history seems very uncomfortable. Instead of the debit and credit columns, it would be much simpler to have positive and negative amounts. Is it really worth now both not corrected and corrected the amounts in the table on the slave, especially if you keep only versions corrected debit and credit columns?

  • Findout incompatibility records between the two tables.

    I need help on findout the unmatched records between two different tables.

    Each table has a + 42Crores Records.

    The type of data (Char) are the same for the two tables but datalength is different between a table and the table B.

    Indexes are created on the two tables on the required fields

    There is no Geom data exists on the two tables.



    For example:

    A Table: =.
    Number of records + 42Crores
    Rating: TOLD char (20)

    Table B: =.
    Number of records + 42Crores
    Field: TOLD Char (16)

    I took individual accounts, there are number of difference is 3868 only, with respect to the count (*) selection.

    I ran the query "Select TOLD OF A LESS SELECT TOLD OF B", but I don't have the answer.

    Please let me know how to solve the problem.

    The variable length char shouldn't be a problem...
    You just need to ensure that the first table has more lines than the second, if the problem persists You ' l I hide it, and then use a column alias...

    Let know us...

  • I bought cs6 design web premium, I need some somware to open the file "7z".

    I bought cs6 design web premium, I need some somware to open the file "7z".

    You can view the applications download Creative Suite 6 to download the software. To open the 7z file, you can download WinRAR from WinRAR download and support: download

    Hope this will help you.

    Concerning

    Hervé Khare

  • How do I know if the two tables are the same in the data they contain

    Hello

    How will I know if the two tables are the same in the data they contain?

    Hello

    Please check this thread [compare all columns | http://forums.oracle.com/forums/thread.jspa?messageID=3166309�].

    Kind regards

  • By comparing the two tables for the integrity of the data

    Hi all
    I need to compare two tables for the integrity of the data through the SQL query.

    If you need to compare all the columns of t1 to t2:

    (SELECT * FROM t1
    MINUS
    SELECT * FROM t2)
    UNION ALL
    (SELECT * FROM t2
    MINUS
    SELECT * FROM t1);
    

    Kind regards
    Ankit Rouault
    http://theoraclelog.blogspot.in

  • Need some suggestions in writing the package...

    Hello world

    I just asking this question to know better than I do.
    I have a patient with 2 million lines in it. Is it possible to extract the 2 million lines in a textfile using UTL_FILE?. I need to extract each related data patients from different (bigger than the patient table) tables in a file deleted by commas. For each patient id, I must query other tables and get the data associated with this patient (depending on condition). For this I need to call different functions on different tables.

    Some people think like that...

    Create or replace procedure XXXX

    cursor-> to get the ID of the patient
    variables-> declare all variables

    Start

    File Manager for the file of the utl to write to a file
    Open the cursor
    using bulk collect limited no of lines extraction

    For each patient id
    Data1: = function1
    data2: = function2
    Data3: = function3
    --
    --
    --
    --
    --

    string: = data1 | Data2. Data3. ....
    UTL_FILE.put_line
    redefine the chain
    end loop;

    end;

    My questions are:

    Is it possible to call different functions for each id of patients (2 million patients) are there? is there a better way to do it.
    Please give me some suggestions if I need to change all the steps that I follow for best performance.

    Thank you
    Phani

    Marella Phani wrote:
    What happens if the function is a logic complex which can be done in SQL?

    Then, I would say that you might be surprised at what can be achieved in SQL, and if you encounter any problems just post it here, I'm sure there will be someone who could fall for you ;)

    Seriously, if you need to call a function of 2 million times, you code seriously slow, not to mention the processing power that would be involved. It's the difference between the treatment by SETs (SQL) and treatment by unique records.

  • Need some tips to maintenance for laptop - Satellite L40

    Hello

    I have Satellite L40-170, and I have a few questions about her, since it is the my first laptop:

    1 should I remove the battery when it is fully charged and I work on the KT?
    2. If I don't need to use the battery for a period of time (2-3 weeks) I let loaded or unloaded?
    3. I realized how to cleanse the body and screen of the laptop, but I don't know exactly how to clean air vent covers?
    4. I am running XP and the temperature of the CPU, according to Everest varies between 35-55 degrees Celsius, is this normal?
    5. I just read the thread for a L40 fading paint, here in the forum and I grew up very worried, what to do to prevent such an unpleasant effect?

    So, here are my questions for now, I'd be more than happy if I get answers to my questions.

    Thank you in advance!

    CDL 1 & 2 If you work on AC you should removed the battery... But I read it is better for the battery is discharged to 40-50% and then removed... and if you do not use the battery for the longer period, leave is too loaded in 40-50%... There is another opinion - leaving the battery fully charged, but in the two most important is - battery must not be discharged to leave...

    ad.3 vent - use compressed air
    ad.4 temp is ok.
    CDL 5 it is lok as very rare problem, because I don't ' t find any post something like that

  • to merge the three table

    Hi all

    I have three table as follows:

    Table of values (2, 3, 5, 1, 0, 4)

    Two Array (00, 01, 03, 04, 05, 02) values

    Table 3 (name1, name2, Name3, name4, name5, Name6) values

    Now I have to merge these three table in a table as follows:

    Table (2_00_NAME1, 3_01_Name2, 5_03_Name3... and so on)

    Can someone help me with this? I don't know how to merge it as one?

    If anyone can help I'd be very happy...

    Thanks in advance...

    Pals

    You don't know what it is just that you want, but this could be a start.

  • Attach the two tables

    I have two tables I want to fix the end to end.  If I use the version table it creates an annexed table which is not what I want.  essntially im doing the opposite of WBS.  are there features that fit this description?

    in fact, I just found out 'insert into array' worked for me.  I'll try you method too next time

  • 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

  • Is there an easy way to merge the two databases?

    I would like to know if there is an easy way to merge two data from a single database?

    The two databases are generated on different machines with different data (no duplicates).


    Thank you!



    Mark

    It is possible that the db_dump and db_load utilities can be used here.   They are documented in the BDB C API reference manual.      Basic process would be to empty the database on a system, move the files to the other system can use db_load and load it into the existing db.    Since there is no duplicate, this process should work for you.

    Thank you

    Mike

  • SQL join on the two tables where the column as another column

    Hi all


    tried to get the results of a join between two tables where only one column is like another.

    Table1 (nameA) examples: black2, green1

    Table2 (Name) example: black2.location.uk.com, green1.location.uk.com

    so, for example, I want to match all those in table1 with black2 column in table2 that begins with black2 and so of suite, if you see what im trying to get to!

    My sql up to now:
    select * from  schema.table1 a
    join schema.table2 b 
    on a.nameA like concat('%', b.nameB, '%'); 
    but it errors:

    ORA-00909: invalid number of arguments
    00909 00000 - "invalid number of arguments.

    Any help or advice would be greatly appreciated, thank you!

    Or any of them should do...

    select * from  schema.table1 a
    join schema.table2 b on a.nameA like '%'||b.nameB||'%';
    

    or

    select * from  schema.table1 a
    join schema.table2 b on instr(b.nameB,a.nameA) > 0
    

Maybe you are looking for

  • do remote debugging - switch works / of via ini?

    Hi, I have read and understood how to debug remotely a VI - it works pretty well.My question is - can I set flags "Wait for debugger on launch" and "Enable debugging" in the specification to build for the stand-alone application in real time for all

  • Cannot access my DVD-CD in my computer

    Original title; DVD - Rw disc When I insert a cd it plays ok automatically. However if I open 'Computer' and try to access the information on the disk by clicking on the player it does not. Initially, I got a response. "Windows cannot access the spec

  • Problem with new Compaq CQ58

    I bought a Compaq CQ58-201SA as a surprise gift for my young grandson. BEFORE GIVING IT to HIM, I want to load some programs, so it's all ready for him to go.  However, when you start the new laptop for this purpose, I get invited to "Choose a color"

  • Debranding my Z2

    If I debrand my handset wil it void my warranty. My camera is brand O2-UK and I plan to install the Generic firmware to UK

  • Blue screen on dxgkrnl.sys errors

    Since I installed x 64 RTM on my inspiron 1525, I have had weird BSOD and crashes 'Windows Explorer' -BSOD on dxgkrnl.sys-KB974431 is installed