Move columns in a table

Hello world

4.e first I voltage value and the last four columns that I have the date of acquisition. I need to move the position of the columns. The diagram below shows how it should be the final position of the table.

Thank you.

Hi Carlos,

I took a glance at your VI and I think that the solution to the problem is the first extract.  But then again I thought why do you it this way.  So, I programmed differently and which is indicated in the second VI.  The other should be much better then the first.  Probably not the best way to do it, but it is programmed in 5 seconds

Tags: NI Software

Similar Questions

  • How to remove columns from the table on the master 1-0?

    I have an array of 96 columns with strings. I also have the array of int 96-elemets (mask) with 1 and 0.

    What I want to do is to is to remove (or hide - but I read that it is not possible) all the columns with index corresponding to 0 in the mask table.

    example:

    columns in the table

    1 2 3 4 5

    mask

    0 1 0 0 1

    I want to remove the columns 1, 3 and 4 and leave only 2 and 5 in my table.

    How can I do?

    If I create loop for with i as the index of the column, when I do DeleteTableColumns() columns number decreases, and I get an error of range out of

    Or do I have an option to hide the unnecessary columns (not set their width to 1, it's very ugly-looking)?

    Please help me (())

    Hello rovnyart!

    1. removal of columns in the table:

    I suspect that the reason why you get the out-of-range error is due to fact that in your loop, you delete the columns in the table, you'll eventually end up by referring to a column that no longer exists, because the other columns before it have been deleted. While you remove each column of your table in the loop for example, the column index number will move, because you deleted the other columns in front of her.

    To resolve this, even if you delete a column in your loop, make sure that you take also into account that the index of the column is moved because of the removed columns.

    2 hide columns in table:

    You can use the ATTR_COLUMN_VISIBLE attribute to hide columns in the table:

    http://forums.NI.com/T5/LabWindows-CVI-idea-exchange/add-attr-column-visible-attribute-for-table-Col...

    http://zone.NI.com/reference/en-XX/help/370051Y-01/CVI/uiref/cviattrcolumnvisible_column/

    3 alternatives:

    Note that another alternative would also use a tree instead, control as the tree control also supports the hidable columns:

    http://forums.NI.com/T5/LabWindows-CVI/table-hide-column/TD-p/569773

    Best regards!

    -Johannes

  • Impact of removing columns in a table

    Hello

    Using oracle 11.2.0.3

    We want to remove some columns in a table in a tidy exercise - as they are not necessary - the application code that references will change them.

    Anyone see any negative impact: what are non indexed columns cannot therefore predict problems - just thought I would check in the case where someone met all similar questions making.

    Thank you

    Anyone see any negative impact: what are non indexed columns cannot therefore predict problems - just thought I would check in the case where someone met all similar questions making.

    Yes - there MAY BE negative effects.

    1. you can lose data if you do not have this table saved (or active flashback) so you can restore the data and move the original table if there is a problem during the operation. There is ALWAYS a risk of system failure even if the risk is low. Abandoned data cannot be recovered, so you better have a backup from top - to the second.

    2. the DROP operation actually deletes the data for EACH ROW in the table. This means a full table scan and possible restructuring of blocks. These columns can be part of, or severely, chained the lines. They could be the LOB columns whose data is stored in another segment that must also be cleaned.

    You have not displayed enough details for us to know what would be the issues here for your unknown column types.

    But exercise alone.

    http://docs.Oracle.com/CD/B28359_01/server.111/b28310/tables006.htm#i1006709

    Deleting table columns

    When you issue a ALTER TABLE...DROP COLUMN statement, the column descriptor and data associated with the target column are removed from each row in the table. You can drop multiple columns with a single statement.

    At a minimum, you need to back up this table before and after the MOVE. This backup operation will use the resources so it can also have an impact.

  • Move the System Tablespace Tables

    Hello

    Operating system: Windows Server 2008

    Database version: 11.1.0.7

    The database is used for Siebel UCM Application, all of the tables in the schema SIEBEL has been created in the SYSTEM tablespace.

    SQL > SELECT COUNT (*) FROM DBA_SEGMENTS WHERE nom_tablespace = 'SYSTEM '.

    COUNT (*)
    ----------
    28704

    Is it possible that I can move specific tables of SIEBEL UCM in tablespace separated as SIEBELDATA.

    Thank you

    Hello

    "Yes, you can."   s ' there is no LONG columns in your tables.

    Try something like this to produce your statements:

    SELECT 'alter table ' || owner || '."' || segment_name || '" move tablespace ;'
      FROM dba_segments
    WHERE tablespace_name  = 'SYSTEM' -- '&tbs_quelle'
       and owner        like ''
       AND segment_type    = 'TABLE'
       and segment_name like upper('')
    order by segment_name;
    
    SELECT 'alter index ' || owner || '."' || segment_name || '" rebuild tablespace ;'
      FROM dba_segments
    WHERE tablespace_name  = 'SYSTEM' -- '&tbs_quelle'
       and owner        like ''
       AND segment_type    = 'INDEX'
       and segment_name like upper('')
    order by segment_name;
    

    concerning

    Kay

  • Disable the column in a table.

    Hello

    How can I disable column in a table.
    in collaboration with 4.1 and I Assistant founded in table form.

    If I entered the value in a column second column must disable and vice versa?



    How can I do this?



    Thanks and greetings
    CORINE

    CORINE wrote:
    Hello
    Could you help me to write the code. My column in a table are 13,14,15,16

    If I type in field 13 then 14 and 16th column should turn off and
    If I go should disable the value in field 14 and 13 and 15 column.

    How can I do this?

    Thank you & best regards
    CORINE

    I have not tested this code; but the following may be your approach:
    In the field 'Attributes of the element' of column 13, you can call a javascript function:

    onblur = "javascript:updateCols(this);"
    

    In your browser, right click on each of your columns (one at a time) and select "inspect element" to check the attributes of the HTML element. Assuming that column in the form of your table 13 is rendered in the HTML like f13, 14th column as f14, 15 columns as f15 and 16th as f16, write this JS function in the HTML page header:

    
    

    The JS function above is triggered when the user moves out of column 13. The function then checks the length of the value entered by the user in column 13. If the length is greater than 0, it disables the columns 14th and 15th. Otherwise, it allows them.

    The code above is for your first scenario:

    If I get home should disable the value in the field column 13 then 14 and 16

    You can do the same for the other scenario.

    Hope this is clear. Or otherwise, give me access to your workspace and I try the here above.

  • Number of records per column in each table

    Hi all

    I need to get the number of records by column for each table in a schema.

    Is there a way I get the list of columns in each table in a schema and get the number of records per column where the count > 0?

    We have oracle 10g

    Thank you

    Smidreb wrote:
    You are right, but we're going to run the script as soon as we move

    the script below gives me a correct result.

    If it works well for you, then it works OK for me.

    Realize that Oracle is that I/O block-level.
    As a general rule, any LINE is a single block.
    Realize that is 1 column "count (*)" is correct, then all the columns in the same row are correct.
    This obsessive compulsion to count each COLUMN in each LINE borders on real PARANOIA!

  • Explicit cursor, column from several tables in a variable

    Here's the situation. This DB has tables of metadata. An example of table name would be g3e_attribute. Once you insert a record in a metadata table a trigger of executions insert and insert records in the g3e_attribute_0009 table (table of language, this is what I call it). It would insert in g3e_attribute_000C is the default language is the French. There is also a delete trigger so that if you delete a record in a table of metadata it deletes the corresponding language table. Well, somehow we have entered the language tables that are not in the metadata table. A problem with the system.

    There are 139 tables of language so I prefer not to do it manually.


    So I'm keen to make this code

    delete < table language > where < primary > not in (select < primary > in < metadata table >).

    So I need to loop through the table and and the corresponding primary keys.

    I have this code to get the table names
    Select table_name, substr (table_name, 0, (length (table_name)-5)) in all_tables where table_name like 'G3E_ % _000% ';

    This will display both the language metadata tale table names and.
    The table of language with either _0009 or _000C as a suffix, I take everything but the last 5 characters to get the table metadata.

    And I have the code to find the primary key of the table.
    SELECT column_name FROM ALL_CONS_COLUMNS A JOIN ALL_CONSTRAINTS C ON A.CONSTRAINT_NAME = C.CONSTRAINT_NAME WHERE 'G3E_LEGENDENTRY' AND C.CONSTRAINT_TYPE = C.TABLE_NAME = 'P ';


    So I just need to loop through all the tables. Put these pieces together, that's where I encountered a problem. I started to do a procedure, but I ran into a problem.

    When you loop, you move the record being the explicit cursor in a variable. Well, you can set the variable as a vertain column type (%), or type (%ROWTYPE) of the line. Although the sql I use to create the cursor takes columns from multiple tables and returns three columns. So I'm not sure how ot define the variable. The only work around I found was to make a table column_name that contains the table table,. Define the variable as rowType.

    Is there an easier way to do this?


    Thank you

    A couple of points.

    You should not really mix ansi joins and joins in the place where clause. Choose a style and stick to it.

    You can't do the DDL directly in pl/sql. You need to do this, use dynamic sql. something like:

    create or replace
    PROCEDURE SYNC_LANGMETATABLES AS
    
    CURSOR c_TABLE_PRIMARY IS
       select D.table_name, substr(D.table_name,0,(length(D.table_name)-5)),
              column_name
       from all_tables D,
          JOIN ALL_CONSTRAINTS C
             on C.TABLE_NAME = D.TABLE_NAME
          join ALL_CONS_COLUMNS A
             ON A.CONSTRAINT_NAME = C.CONSTRAINT_NAME
       where D.table_name like 'G3E_%_000%' AND
             C.CONSTRAINT_TYPE = 'P';
    
       v_LANGTABLE ALL_TABLES.TABLE_NAME%TYPE;
       v_METATABLE ALL_TABLES.TABLE_NAME%TYPE;
       v_PRIMKEY ALL_CONS_COLUMNS.COLUMN_NAME%TYPE;
    
    BEGIN
       OPEN c_TABLE_PRIMARY;
       LOOP
          FETCH c_TABLE_PRIMARY INTO v_LANGTABLE,v_METATABLE,v_PRIMKEY;
          EXIT WHEN c_TABLE_PRIMARY%NOTFOUND;
          execute immediate 'delete from '||v_langtable||' where '||v_PRIMKEY||
                            ' NOT IN(SELECT '||v_PRIMKEY||' FROM v_METATABLE)';
       END LOOP;
       CLOSE C_TABLE_PRIMARY;
    END;
    

    John

  • How to calculate the sum of the values of some columns in a table

    Hello

    I want to get the column just the average of the values of some columns not all columns of the table.what I have to change exactly in this block diagram.even if the table size is 25 average, I want the division as the number of values in each column (= number of lines)

    just like that:


  • How can, during the collection of data, start a new column in my table every 100 data points?

    Hello! I have a problem with my data - I get in a wide range of 1 x 1000, but it's the repeated measures, each taking about 500 data points. I want to break this table for this data string start a new column in my table every 500 points given. I don't know how to do it-please help!

    datacompiler100 wrote:

    Hey thanks for the sponsor and the first off I must apologize for the State, I am attaching my VI. I put the part of the VI that I am working on (my team has access, so didn't post everything here) and also attached the data file (when just written in a spreadsheet file, not through the attached VI). I want to convert the long row of data and then start a new column every 50, 100, 5 points (user-defined).

    Using the data from the file, you can reshape everything simply (as you already!), followed by transposition (since you want columns instead of rows). 2D arrays must always be rectangular, so the last column is filled with zeros if necessary. Is that what you want?

    Of course if you try to add a new column in a file, that will not work. You can only add lines in an existing file because of the way the data is organized. To add columns, the entire file must be read, intertwined and all re-written new data in the file.

  • How can I insert a number to a specific index (row and column) to a table

    I had the most with function 'insert into array' problem because of its counter-intuitiveness. I want to insert a number I got inside a loop IN a table. The ROW and COLUMN of this table I want enter the number is specified by the number of loops of two loops FOR. It did not work.

    So, I have isolated and tested this function further. Frankly, I initialized a table 2D with ZEROS and plugged into the "insert into array" function (on top of entry). I then put the number '1' for the index (line) and the number "2" for the index (column) and then put the entry number "6" for the "new item/sub-table. Then, I hung a picture of 2-D (indicator) output to the output of the function "insert into array. When I did all that, it means I want to just put the number '6' in line '1' and the column '2'... This isn't letting me do it.

    How can I do this SIMPLE?

    Hi Darrell h...,

    Looks like you can use the function "autoindexing. Take your value and connect it to your loop, it will be a default autoindexing. Right-click on the last tunnel of output and select Create indicator, the result is your table.

    It will be useful.

    Mike

  • histogram with just a few columns from a table

    I want to get a histogram of a few columns from a table (4 - 6-... 22)


  • Insert columns to a table in another

    How can we insert the columns in a table in another table, to every strange place this table in which inserts must be made? In short, the columns of a table into another table bt possibly between the table already detected.

    Here's an example, feel free to ask the question if it is not clear to you.

    It may be useful

  • Insert a column in the table (perhaps a silly question?)

    This may seem a stupid question, but is - it possible in Labview to insert a new column in a table that is established? For example, if I have a 2 column table is it possible to insert a new column between two columns? If not is there another tool such as a table or something I should use, and how do you use it?

    Thank you

    Hi LV.

    Use the Vi 'insert Array"as shown:

    RGS,

    Lucither

  • How to create a status column in the table

    Hello everyone

    I am trying to create a column of the table status in frontview Panel. I enclose a picture with her to say clearly what I say.plz tell me how to create the active status column in the table.

    I want to show green for safety stock and red for safety stock below.


  • How to find the value max and min for each column in a table 2d?

    How to find the value max and min for each column in a table 2d?

    For example, in the table max/min for the first three columns would be 45/23, 14/10, 80/67.

    Thank you

    Chuck,

    With color on your bars, you should have enough experience to understand this.

    You're a loop in the table already.  Now you just need a function like table Max and min. loop.  And you may need to transpose the table 2D.

Maybe you are looking for

  • Constant rotation beach ball - El Capitan

    I started having this problem a few weeks ago with Mail app taking to always answer, took 5 minutes just to get composition window. Spinning wheel now on pretty much everything what to do. So, I found another post on this topic and follow the steps p

  • How to operate the system Exec (Batch file) as an administrator

    Hello I have a batch file that I need to run. But it should work with administrator access. How can I run a command line by using the Exec.vi system as an administrator?

  • Extreme Cry1 compatibility issues

    I tried to run the original Far Cry in various compabilities but I can't get the mouse to function in the game.  I just upgraded to Windows 7 yesterday, so there is no point in using the system restore.

  • Why my pc will not allow the download?

    I downloaded it, but when I hit run this appears: C:\Documents and Settings\Brilliance Academy\My Documents\Downloads\SkydriveSetup.exe is not a valid Win32 Application What does that mean?

  • Hi I have a mirror screen ACER Aspire R3 - 131T 11.6 2 in 1 sound on my TV problems

    Hi people I have problems with the sound when I use display showing the pic in my sony bravia tv via bluetooth is ok, but the sound is static type crackling noise cound would this little lappy is not up to the job its ok when I use the set method in