Create table 2d by pulling larger 2d table columns, as indivated by an array of Boolean

Hello

I have a 2d chart with 16 columns that contain data from different input channels.  I also have a 1 d array of Boolean (length 16) corresponding to these columns.  In the table of Boolean 1 d, if a value is true, I want this column in table 2d to stay.  If the value in the table of Boolean 1 d is wrong, I want to delete the corresponding column.

Thus, for example, if the table of Boolean 1 d looks like this:

[T T T T F F T T T F T T F F T F]

the new 2d array would be 10 columns, which correspond to the columns of the old 16-column of table 1, 2, 3, 4, 7, 8, 9, 11, 12 and 15.

I am very new to labview (programming just started yesterday). Can someone help a newbie to do something that is probably simple? In my view, that there will be an iteration back through the deletion of rows and 16 columns table columns as they come if the value of the Boolean vector is false, or iterate forward through the 16 columns and add columns to a table if the value of the Boolean vector is true... but I don't know how to do this.

Thank you

Matt

If you have 2012 you could just do this:

-Ryan S.

Tags: NI Software

Similar Questions

  • Computed in a Create table columns

    It's my create table statement:

    CREATE TABLE DTPartInv
    (partinv_partnbr VARCHAR2 (10) NOT NULL,)
    partinv_prodname VARCHAR2 (25).
    partinv_desc VARCHAR2 (25).
    partinv_manufact VARCHAR2 (25).
    partinv_instock INTEGER NOT NULL,
    partinv_category VARCHAR2 (20).
    partinv_purchdate DATE,
    partinv_loc VARCHAR2 (15).
    partinv_price NUMBER (6.2),
    partinv_vendor VARCHAR2 (20).
    partinv_reorder INTEGER NOT NULL,
    partinv_serial VARCHAR2 (20).
    partinv_flag as (case when partinv_instock < partinv_reorder then 'X' else 'o' end), calculated column
    CONSTRAINT DTPartInv_partinv_partnbr_pk
    PRIMARY KEY (partinv_partnbr)
    );

    and here's my Insert into table instructions:
    INSERT INTO DTPartInv VALUES ('XT40010E', 'TMC Inc', 2, Null, 'Exhaust' 'pipes', TO_DATE (11 April 10 ',' DD-MON-RR'), Null, 45.95, 'Oracle Auto Parts', 1, Null);
    INSERT INTO DTPartInv VALUES ('CH9260', Null, 'oil filter', 'Mechanical parts', 5, 'Fuild filters', TO_DATE (15 January 10 ',' DD-MON-RR'), Null, 20.00, "wells auto P", 2, Null);
    INSERT INTO DTPartInv VALUES ('15W40', Null, ' oil ',' sink the oil ', 20, 'Auto Fuilds', TO_DATE (February 10, 11 ',' DD-MON-RR'), Null, 10.00, "Oracle Auto Parts", 5, Null,);
    INSERT INTO DTPartInv VALUES ('C9262', Null, 'fuel filter', 'Mechanical parts', 2, 'Fuild filters', TO_DATE (October 20, 10 ',' DD-MON-RR'), Null, 35.95, 'sink Auto Parts', 1, Null);
    INSERT INTO DTPartInv VALUES ('PS7716', Null, ' Fuel/water separator', 'Parts', 4, 'Fuild filters', TO_DATE (December 9, 10 ',' DD-MON-RR'), Null, 50.00, 'sink Auto Parts', 1, Null);
    INSERT INTO DTPartInv VALUES ('800142', Null, 'Valve PPI', 'Beink pipes Inc.', 10, 'Valves', TO_DATE (June 1, 11 ',' DD-MON-RR'), Null, 20.00, 'Oracle Auto Parts', 2, Null);
    INSERT INTO DTPartInv VALUES ('TTS400', 'Clip Butt', Null, 'Beink pipes Inc.', 10, 'Valves', TO_DATE (October 31, 11 ',' DD-MON-RR'), Null, 15.95, 'Oracle Auto Parts', 2, Null);
    INSERT INTO DTPartInv VALUES ('TBA400', 'Clamp Lap', Null, 'Beink pipes Inc.', 10, 'Valves', TO_DATE (November 10, 11 ',' DD-MON-RR'), Null, 30.00, 'Oracle Auto Parts', 2, Null);
    INSERT INTO DTPartInv VALUES (Null, mechanical parts "Brake pads',"Mechanical CostVB", 5,", 'SC16650', TO_DATE (May 15, 11 ',' DD-MON-RR'), Null, 60.00, 'Adosql Auto Parts', 1, Null);
    INSERT INTO DTPartInv VALUES ('OB46613', Null, 'emergency door latch", 'Mechanical CostVB', 3, 'Mechanical parts', TO_DATE ('01 - sept.-11 ',' DD-MON-RR'), Null, 45.95, 'Adosql Auto Parts', 1, Null);

    And this is a sample of the error, I can test:
    INSERT INTO DTPartInv VALUES ('XT40010E', 'TMC Inc', 2, Null, 'Exhaust' 'pipes', TO_DATE (11 April 10 ',' DD-MON-RR'), Null, 45.95, 'Oracle Auto Parts', 1, Null)
    ERROR on line 1:
    ORA-00947: not enough values

    I need to understand what it is that I'm missing here. partinv_flag is supposed to be calculated according to partinv_instock and partinv_reorder.

    Hello

    Review the syntax for virtual columns in the manual of the SQL language:
    http://download.Oracle.com/docs/CD/E11882_01/server.112/e26088/statements_7002.htm#sthref5146

    You want something like this (showing only the relevant columns):

    CREATE TABLE DTPartInv
    (
         partinv_instock          INTEGER          NOT NULL
    ,     partinv_reorder          INTEGER          NOT NULL
    ,     partinv_flag           VARCHAR2 (1)      AS ( CASE
                                            WHEN  partinv_instock < partinv_reorder
                                           THEN 'X'
                                              ELSE 'O'
                                        END
                                     )
    );
    
    INSERT INTO DTPartInv (partinv_instock, partinv_reorder) VALUES (100, 100);
    

    Announcing the column names until the VALUES of Word key is a good idea in any case, and it is needed when you have virtual columns.

  • Create table column position questions?

    Hi all

    I'm just confused the saying that the positioning of column in tables is not serious for the relational database?

    Do you agree or disagree.

    For me, I do not share. Why?
    SQL>  create table a (a char(10),b number);
    
    Table created.
    
    SQL> create table b (b number, a char(10));
    
    Table created.
    
    SQL> insert into a values ('a',1);
    
    1 row created.
    
    SQL> commit;
    
    Commit complete.
    
    SQL> insert into b select * from a;
    insert into b select * from a
                         *
    ERROR at line 1:
    ORA-01722: invalid number
    If it isn't serious.

    Thank you

    KinsaKaUy? wrote:
    OK maybe I interpreted in the wrong sense :))

    Can you help with this problem.

    I have an EMP table with more than 10,000 rows and 500 columns.

    The developer was asked to edit a column ATTRIBUTE1 of VARCHAR2 (10) number;

    It is said that the column must be empty to change the data type, so I created a backup:

    CREATE TABLE EMP_BAK AS SELECT * FROM EMP;
    TRUNCATE TABLE EMP;
    ALTER TABLE EMP MODIFY (ATTRIBUTE1 NUMBER);

    How can I insert it using the... INSERT INTO EMP SELECT * FROM EMP_BAK;

    To aggraviate the situation the designer wants to move the position of the column in the 100th place in 10th place.
    Assuming that you can't reason with out them, how to make this task easier?

    Thank you

    Rather than create a new table and your complications mentioned above, you can follow the Sub method I guess.

    ALTER TABLE DUMMY_ATTRIBUTE1 ADD EMP NUMBER;

    UPDATE EMP
    ATTRIBUTE1 SET = DUMMY_ATTRIBUTE1
    WHERE 1 = 1;

    COMMIT;

    UPDATE EMP
    ATTRIBUTE1 SET = NULL
    WHERE 1 = 1;

    COMMIT;

    ALTER TABLE EMP CHANGE ATTRIBUTE1 NUMBER;

    UPDATE EMP
    SET DUMMY_ATTRIBUTE1 = ATTRIBUTE1
    WHERE 1 = 1;

    COMMIT;

    ALTER TABLE DROP COLUMN DUMMY_ATTRIBUTE1 EMP;

  • Creating table in the schema has with the user B and granting permissions to the user C

    Hello, I have a problem fun - we have a large table which requires a batch to make millions of updates, and he needs to finish more quickly. It takes several hours as an update, but a select create table did the same thing in about a minute. Yay! Then we just delete the old table and rename the new table to the former, rebuild all the index and grant select/insert/update/delete permissions to another user who needs access... and there is the problem, Oracle said insufficient privs.

    We have A figure, which is the owner of the table, userid B who done all the stuff of application batch and userid C which performs inserts for a process of middleware. None of them are actual users, of course. We want that user B to do the ETG, rename, rebuild and re-grant of the authorisation of the index. But user B apparently cannot grant permissions on objects in the schema A to user C, even if B has created the table and has the role DBA (not ideal, I know)!

    What's really crazy is that there is no sense unique user b can grant permissions to user C, which is to:

    grant select any table USER c;
    grant insert any table USER c;
    grant update any table USER c;
    Grant delete any table USER c;

    It seems really perverse can create tables in diagram A and even grant C privs "whole table" that user B, but may not grant privs specifically on this object in the schema A, even with DBA privs. I must be missing something... right?

    Yes. By default, the stored procedures are stored procedures from DEFINER rights. If A is the owner of a stored procedure, this stored procedure can do whatever A enjoys the privileges to directly. If A grants B privileges RUN this stored procedure, when B calls the stored procedure, the procedure runs with the privileges.

    I agree point stew, however, re-creating objects in Oracle is generally a bad idea and a TRUNCATE with one insert direct-path, possibly combined with the deactivation and the rebuilding of the index would be more appropriate than a DEC. If you're going to stick with this Assignment, however, that really do in a stored procedure owned by A while B has no need to CREATE ANY TABLE.

    Justin

  • Create table statement bulk

    Hello

    I am facing the following problem:

    A database is running with a large number of tables.
    Database B must contain the same tables with different data (DB B is empty at the moment).
    So I have collected all the "create table" - statements and they crammed into a script.

    Because there are a several foreign key constraints in the DB A (not all may be delayed) it seems to be a problem to run the script.
    I searched on the internet how to disable constraints before the execution of the instructions, but I ' ve only found solutions for the deactivation of the constraints for existing tables already - don't disable forced verifies the determination to create.

    So, could you please give me a hint what keywords should I use to search?

    Thanks in advance.

    It seems you are interested only in the metadata DB A to B. DB

    If it is 10g, you can use METADATA_ONLY with expdp

    Otherewise, you can set lines = n with exp.

    and put the list of tables in a parameter file.

    HTH...

    Published by: SKU on December 7, 2009 11:05

  • Create an array of Boolean 1 d of reference Boolean table 1 d

    Hello

    Any suggestions on how to create an array of Boolean 1 d of reference Boolean table 1 d?

    Thank you for any ideas?

    You can wire the reference to a node value property and get the array of Boolean.

  • DB tools create Table

    Hello.. I got this error when trying to create a database

    Conn Execute.vi-> DB tools create Table.vi--> CreateDatabase.viException occurred in the Microsoft Office Access database engine: syntax error in the statement CREATE TABLE in Conn Execute.vi-> DB tools create Table.vi-> CreateDatabase.vi

    I can't open your vi, but in many cases, the syntax error is caused by the invalid table or field names (reserved words, spaces or invalid characters). In this case, you can change the names; Alternatively, you can frame them square brackets: [my_column_name].

    If you open the DB create Table.vi-> Conn Execute.vi block diagram, you can enter the full text of the SQL query and post, so we can take a look.

  • 'Create table' is not possible with Jet.OLEDB.4.0

    I use LabVIEW Toolkit DB to access databases.

    I opened an access database of microsoft with the connection string "Provider = Microsoft.Jet.OLEDB.4.0; Data Source = C:\test3.accdb".

    When I exeucted

    create table leq_octave_5min (recorded_time DATETIME CONSTRAINT PRIMARY KEY pk1,
    Leq5 LEQ5 FLOAT NOT NULL CONSTRAINT,
    Min MIN FLOAT NOT NULL CONSTRAINT,
    Max MAX FLOAT NOT NULL CONSTRAINT,
    L05 FLOAT L05 CONSTRAINT NOT NULL,.
    L10 FLOAT L10 CONSTRAINT NOT NULL,.
    L50 FLOAT L50 CONSTRAINT NOT NULL,.
    L.90 L.90 FLOAT CONSTRAINT NOT NULL,
    L95 FLOAT L95 CONSTRAINT NOT NULL,.
    Us01 us01 FLOAT NOT NULL CONSTRAINT,
    EN02 EN02 FLOAT NOT NULL CONSTRAINT,
    Fr03 FR03 FLOAT NOT NULL CONSTRAINT,
    Fr04 fr04 FLOAT NOT NULL CONSTRAINT,
    Fr05 fr05 FLOAT NOT NULL CONSTRAINT,
    Fr06 fr06 FLOAT NOT NULL CONSTRAINT,
    Fr07 fr07 FLOAT NOT NULL CONSTRAINT,
    Fr08 FR08 FLOAT NOT NULL CONSTRAINT,
    Fr09 FR09 FLOAT NOT NULL CONSTRAINT,
    Fr10 fr10 FLOAT NOT NULL CONSTRAINT,
    Fr11 FR11 FLOAT NOT NULL CONSTRAINT,
    Fr12 FR12 FLOAT NOT NULL CONSTRAINT,
    Fr13 FR13 FLOAT NOT NULL CONSTRAINT,
    Fr14 FR14 FLOAT NOT NULL CONSTRAINT,
    Fr15 FR15 FLOAT NOT NULL CONSTRAINT,
    Fr16 FR16 FLOAT NOT NULL CONSTRAINT,
    Fr17 FR17 FLOAT NOT NULL CONSTRAINT,
    Fr18 FR18 FLOAT NOT NULL CONSTRAINT,
    Fr19 FR19 FLOAT NOT NULL CONSTRAINT,
    Fr20 FR20 FLOAT NOT NULL CONSTRAINT,
    Fr21 FR21 FLOAT NOT NULL CONSTRAINT,
    Fr22 FR22 FLOAT NOT NULL CONSTRAINT,
    E23, e23 FLOAT NOT NULL CONSTRAINT,
    Fr24 FR24 FLOAT NOT NULL CONSTRAINT,
    Fr25 fr25 FLOAT NOT NULL CONSTRAINT,
    Fr26 FR26 FLOAT NOT NULL CONSTRAINT,
    Fr27 fr27 FLOAT NOT NULL CONSTRAINT,
    Fr28 FR28 FLOAT NOT NULL CONSTRAINT,
    Fr29 FR29 FLOAT NOT NULL CONSTRAINT,
    Fr30 FR30 FLOAT NOT NULL CONSTRAINT,
    status TEXT (2) st NOT NULL CONSTRAINT)

    I got an error saying "error ADO: 0x80040E14.

    I have not had any problems with an ODBC driver.

    Why make such a mistake with Jet OLE DB?

    A web page was told that MIN and MAX are reserved words of Jet 4.0.

    So I defined with [and].

    Then, after it works.

  • Creating table and use - part 1

    be no difficulty with arrays in C, etc. but creating tables of LabVIEW poisoned me. Unfortunately, the heart I sure table labs start out with a table already in place is not much help either. For example, in the attachment, I have a simple loop generating a series of figures that I want to put in a picture. I place a table on the block diagram and its type sucks and I can't find a good way to change it. The textbook says to drag an object in the table on the front panel. So, how is - a hang out an integer in an array?

    Thank you

    JVH

    jvh75021 wrote:
    Thanks for the post. Where did you get the constant that you drag in the table?

    I'll try to help in this form:

    Darren wrote:

    If you know the name of the object you want, you don't have to look at all the pallets.

    Amazing that NEITHER use YouTube for video hosting, because it is blocked by the firewall of our company.

    Andrey.

  • SQL-Lite create Table?

    I am wanting to save a string of text in a sql database - lite which is called "message1."  I press save button to call this code in my interlocutor.

    URI myURI = URI.create("file:///SDCard/flash.db");
    DatabaseFactory.open(myURI);
    Statement st = d.createStatement( "CREATE TABLE Restaurant (Experience TEXT)" );
    Dialog.alert("Here1!");
    st.prepare();
    st.execute();
    st.close();  
    
    Statement st1 = d.createStatement("INSERT INTO Restaurant(Experience) VALUES ('message1')");
    st1.prepare();
    st1.execute();
    st1.close();
    d.close();
    Dialog.alert("Your info was saved!");
    

    I can't even my Dialog statement to appear?  I do something wrong in the line where I create the table?

    Statement st = d.createStatement ('CREATE TABLE Restaurant (experience TEXT)');

    Because when I move the dialog statement before this line... I can see the dialog box

    Database db;
    URI myURI = URI.create("file:///SDCard/flash.db");
    db = DatabaseFactory.open(myURI);
    
    Statement st= db.createStatement("CREATE TABLE 'Restaurant' ( "
                        + "'Experience' TEXT)");
                st.prepare();
                st.execute();
                st.close();
    
                Statement st1 = db.createStatement("INSERT INTO Restaurant(Experience) VALUES ('Message1')");
                st1.prepare();
                st1.execute();
    
    db.close();
    

    I checked the code and its working very well.

    ----------------------------------------------------------
    feel free to press the congratulations on the left side to thank the user who has helped you.
    Please mark as resolved messages if you found a solution.

  • CRUD for tables with large number of columns

    Hello

    I work for a government agency in Colombia, and we do a poll with about 1200 variables. Our database model has few paintings, but they have a large number of columns. Our Oracle 11 g database is, and we do not use Oracle APEX. I've read about APEX and it seems to be useful to generate quick forms and reports. However, I would like to know if it is possible to generate CRUD for tables with many columns, and that would be the best way to do it.

    Thanks in advance.

    Carlos.

    With the help of 250 point on a single page is actually really bad for the user experience. I would probably be it cut into pieces and using several pages to guide the customer through it as a workflow.

    You could also add some pop-up windows which includes some elements of your table, just saved on other pages. But I probably don't like that.

    Tobias

  • FREELISTS and FREELIST GROUPS of CREATE TABLE

    My oracle 10g, create table statement is below:

    CREATE TABLE S005. Test

    (

    AAA char (1)

    )

    PCTFREE 0

    STORAGE)

    FREELISTS 10

    FREELIST GROUPS 20

    )

    LOGGING

    NOCACHE

    NOPARALLEL

    NOMONITORING;

    After performing this sql, I have a query table USER_TABLES but FREELISTS and FREELIST_GROUPS fields show nothing.

    In my view, FREELISTS value must be 10, and FREELIST_GROUPS should be 20. How to retrieve these values?

    Thank you very much

    SAMS - Oracle FAQ

  • Create table ORA-01031: insufficient privileges

    SQL > indicate user USER is 'TEST_RPT.

    SQL > CREATE TABLE mytest (id NUMBER); - it does not work

    CREATE TABLE mytest (id NUMBER)

    * ERROR at line 1: ORA-01031: insufficient privileges

    SQL > CREATE TABLE TEST_RPT.mytest (id NUMBER).

    Table created. SQL >


    SQL > select * from session_privs;

    PRIVILEGE

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

    ANY PROCEDURE DEBUG

    DEBUGGING SESSION CONNECT

    CREATE INDEXTYPE

    OPERATOR TO CREATE

    CREATE THE TYPE

    CREATE THE TRIGGER

    CREATE PROCEDURE

    CREATE SEQUENCES

    CREATE VIEW

    CREATE SYNONYM

    CREATE THE CLUSTER

    CREATE TABLE

    UNLIMITED TABLESPACE

    ALTER SESSION STATEMENT

    CREATE SESSION

    Try this:

    SELECT USER, SYS_CONTEXT('USERENV','CURRENT_SCHEMA') FROM DUAL;

    The two identical values? CURRENT_SCHEMA is what will determine the owner of the table you create, if you do not specify an owner.

    This can be changed by

    ALTER SESSION SET CURRENT_SCHEMA = whatever_you_want_it_to_be;

  • epengs.dB (ENG) + error CREATE TABLE PS_1099C_CUST_DATA


    PT 8.54.10

    FSCM 9.2 (picture 13)

    SQL Server 2008 (64-bit)

    We get below error when we are in the stages of the creation of the DB via DM scripts.

    Started the: Tue Nov 17 02:10:54 2015
    Release of Data Mover: 8.54.10
    Database: FSDMO92 (ENG)
    Input file: E:\FSDMO92\data\epengs.db (ENG)
    Import 1099C_CUST_DATA
    Create Table 1099C_CUST_DATA
    -SQL error. Position of the error: 0 return: 8601 -.


    [Microsoft] [SQL Server Native Client 10.0] [SQL Server] Column, parameter, or variable #4: could not find the PSDATE data type.
    [Microsoft] [SQL Server Native Client 10.0] [SQL Server] Instructions could not be prepared. (SQLSTATE 37000) 8180

    CREATE TABLE PS_1099C_CUST_DATA (CUST_ID varchar (15) NOT NULL, TIN varchar (20) NOT NULL, TAXPAYER_ID varchar (14) is NOT NULL, ASOF_DATE PSDATE NULL, decimal ENTRY_AMT (26, 3) NOT NULL, decimal INTEREST_EXPENSE (26, 3) NOT NULL, Name1 varchar (40) NOT NULL, NAME2 varchar (40) NOT NULL, NOT NULL of the varchar (55), of ADDR_LN1 ADDR_LN2 varchar (55) NOT NULL) , ADDR_LN3 varchar (55) NOT NULL, ADDR_LN4 varchar (55) NOT NULL, CITY varchar (30) NOT NULL, NOT NULL of the varchar (6) State, POSTAL varchar (12) NOT NULL, TEL varchar (24) is NOT NULL, NAME varchar (50) NOT NULL, Name3 varchar (40) NOT NULL, name4 varchar (40) NOT NULL, CITY3 varchar (30) NOT NULL, Address1 varchar (55) NOT NULL , State3 varchar (6) NOT NULL, POSTAL...
    Error: Unable to process create statement for 1099C_CUST_DATA
    Ending: Tue Nov 17 02:10:56 2015
    Unsuccessful end

    Cannot find the data type PSDATE comes here.  Looks like one of the required scripts has not been executed.  It has been long since I am on a site of SQL Server, but I understand the substance of this issue.  PeopleSoft creates a customized in SQL Server PSDATE data type which is an extension of the date format.

    Rather than to point you to the script, I suggest you go back and find where this prerequisite is necessary and make sure that you are not lacking in any other required component.

  • How to force the data type in create table field?

    Hi all

    I need to force my table to create as follows

    Create table XYZ

    (Test varchar2 (10 CHAR)

    ...

    );

    When I run my Interface the script is

    Create table XYZ

    (Test varchar2 (10))

    ...

    );

    and the DBMS translated into

    Create table XYZ

    (Test varchar2 (10 BYTE),

    ...

    );

    I have the same problem with I$, C$, and so on.

    Best regards

    Marco

    Hi all

    I fix my problem:

    In Phisical Tecnology, under ORACLE Tecnology, data TYPE, I modified the definition of VARCHAR2 in VARCHAR2(%L CHAR).

    (Before it was VARCHAR2 (%)).

    Thank you all.

    Marco

Maybe you are looking for