delete the nth row of the table

Hey guys,.

I have a table of numbers with about 250,000 lines.  I want to give the user the option to delete all the nth lines according to the choice of the user.  The program that I developed and attached takes almost an hour.  Is there a faster way to perform this?

There are a few indicators to chance in there so I can see interactions vs. amount of lines.

Fonzie1104 wrote:

The VI as well as data to use is attached.

Please do not use weird characters in the file names...

Try this. (Attached VI is in LabVIEW 8.6). See if it's a faster.

Modify if needed.

Tags: NI Software

Similar Questions

  • Progress of blank lines to delete the Table

    Hello
    I added the logic to add 10 empty lines and remove empty lines when the form is submitted. But somehow it only deletes the lines in the current screen of the advanced table. If there are 15 lines and I click next to spend the last 5 years and submit the form he removes only 5 blank lines but not the other 10 lines in the previous section.

    where I am doing wrong?

    Thank you
        Row [] row = null;
        ExpAttendeesVORowImpl rowi = null;
        
        if( expattendeesvoimpl1 != null ) 
          {
            row = expattendeesvoimpl1.getAllRowsInRange(); 
           }
            System.out.println("No of items "+row.length);
        for (int i=0;i<row.length;i++)
          {
             pageContext.writeDiagnostics(this, "in loop ", 2); 
             rowi = (ExpAttendeesVORowImpl)row;
    pageContext.writeDiagnostics(this, " in loop row "+ rowi.getName(), 2);
    if((rowi.getName() == null))
    {
    pageContext.writeDiagnostics(this, "deleting row"+ rowi.getName(), 2) ;
    rowi.remove();
    }
    }


    Thanks

    You can try instead to use:

    expattendeesvoimpl1.getFilteredRows ("name", null);

  • DELETE THE TABLE (...) does not

    Hello

    I want to remove some lines from a collection (nested table), but the following statement does not work

    I'm in vaAtcGroups.first... vaAtcGroups.last * DELETE OF TABLE (tmp_drugTable) WHERE v2DrugATC LIKE vaAtcGroups (i) | '%';*
    end loop;

    the table variable is declared and I use it before, just remove it won't work (at least according to this). I always get the error message PL/SQL: ORA-00903: invalid table namepointing to tmp_drugTable.

    There must be a way to do this, I can't see it :)
    Maybe someone else can

    Thank you

    maschlegel wrote:
    Thanks for the explanation.

    You can put your data into a global temporary table and then work with SQL. Data will exist only for the duration of the session or until you do one commit (depending on the way in which you set the TWG).

    That's exactly what I look at you now :)
    I tried to put the following in my inside, but he dislikes the syntax

    (DrugTable) CREATE TABLE TEMPORARY global
    nDrugId number (11.0).
    v2DrugUnit varchar2 (50).
    v2DrugIntervalNumber varchar2 (2000).
    nDrugIntervalId number (11.0).
    v2DrugName varchar2 (50).
    v2DrugATC varchar2 (10)
    ) ON COMMIT DELETE ROWS.

    I tried in the BLOCK IS and after BEGIN, but it gives me the error 'encoutered symbol create when waiting for the next' and then nothing?

    In General, a global temporary Table, you create a time and simply leave it is there to be used as and when you need. that is, you don't need to create dynamically at run time. If you really really really issue when executing DDL statements then you must use the EXECUTE IMMEDIATE to do, because cannot you issue directly code DML, PL/SQL DDL only may be issued directly.

  • Delete the table

    Hello.

    I have a table and where at a specific index, I need to remove the small part of the table as:

    Col 0

    1 pass

    2 in case of failure

    3 in case of failure

    pass 4

    5 in case of failure

    6 in case of failure

    No I have to remove table top, 1 three elements and then two elemets and last remaining two items that I'm not able to do using the delete table icon.

    So, if someone can help me.

    Thank you


  • Database will return no error, but does not delete the table

    Hello

    I'm developing an application that uses a database (SQLite). I would like to delete and re-create a table in the database (this table is the kind of a cache).

    When I run the following code, I get no error but chrome / ripple-> resources-> "Web SQL", I still see the old structure of the table.

    Do you have any idea what the problem might be or how I can solve it?

           db.transaction(
                function (tx) {
                    tx.executeSql('DROP TABLE IF EXISTS users',[],function (tx, res) {}, function (tx, err) {alert(err.message)});
                    tx.executeSql('CREATE TABLE users (firstname, lastname, phonenumber, emailadd, company)',[],function (tx, res) {}, function (tx, err) {alert(err.message)});
                    for (var i = 0; i < oPerson.length; i++) {
                        tx.executeSql('INSERT INTO users (firstname, lastname, phonenumber, emailadd, company) VALUES ("' + oPerson[i].Firstname + '", "' + oPerson[i].Lastname + '", "' + oPerson[i].Phonenumber + '", "' + '", "' + oPerson[i].Emailadd + '", "' + oPerson[i].Company + '")');
                        iUsers = iUsers + 1;
                    }
                }
    
            );
    

    Thank you very much

    Roberto.

    Hello Roberto,

    There was a problem with your INSERT INTO string where you have provided additional value which did not exist as a database column. Change

     oPerson[i].Phonenumber + '", "' + '", "' + oPerson[i].Emailadd
    

    TO

     oPerson[i].Phonenumber + '", "' +  oPerson[i].Emailadd
    

    Here's a complete code that must run:

    var db = openDatabase('mydb', '2.0', 'Test DB', 4 * 1024 * 1024);
    var iUsers = 0;
    var oPerson = [{Firstname: 'Joe',
        Lastname: 'Smith',
        Phonenumber: '1800CALLJOE',
        emailadd: '[email protected]',
        Company: 'Photojam'},
        {Firstname: 'Jack',
        Lastname: 'Smith',
        Phonenumber: '1800JACK999',
        emailadd: '[email protected]',
        Company: 'Photojam'}
        ];
    db.transaction(
                function (tx) {
                    tx.executeSql('DROP TABLE IF EXISTS users',[],function (tx, res) {}, function (tx, err) {alert(err.message)});
                    tx.executeSql('CREATE TABLE users (firstname, lastname, phonenumber, emailadd, company)',[],function (tx, res) {}, function (tx, err) {alert(err.message)});
                    for (var i = 0; i < oPerson.length; i++) {
                        tx.executeSql('INSERT INTO users (firstname, lastname, phonenumber, emailadd, company) VALUES ("' + oPerson[i].Firstname + '", "' + oPerson[i].Lastname + '", "' + oPerson[i].Phonenumber + '", "' + oPerson[i].Emailadd + '", "' + oPerson[i].Company + '")');
                        iUsers = iUsers + 1;
                    }
                }
    
            );
    

    Let me know if there are problems!

    See you soon,.

    James

  • delete the table (richeTableau), but the reverse lines

    Hi all

    I've seen many messages and articles on how to remove lines of a multi select table and it works fine, BUT I want to remove rows from a table of multi selection when it is not selected.
    The use case is that the user is presented with an array of lines. They choose 1 or more lines and press a button. This button calls a bean managed to remove the lines that are NOT selected.

    I have the code where I have a table of (RowKeySet) of the selected lines. I have problems with this Board (only selected lines) to the rear for the user can display.

    Does anyone know how I can do this in the ADF.

    I use ADF 11 g

    Any help would be great.

    Thank you

    It will not work. The problem is that an adf table consists of a user interface model (see you) and the data model in the link layer. If you do not keep the synchronized you run into trouble.

    The getSelectedRowKeys() simply returns the currently selected lines in the table. If you add or remove a key of all you do not change the selection, not the underlying data in the table.

    On the way, you can try to solve, is to add an attribute that is transitional to the data of the table model, you use as discriminant lines to display or not. It's just that you put a (Boolean) check box in the table to select the rows that you want to use later.
    In this way, you can just use this field as a filter and the framework made the rest.

    Timo

  • Deletion of rows in a table while the filter condition is in another table

    Hi all

    I am facing a problem of deletion of a row in a table where the condition is in the other table. To ealaborate the scenario further Let's say I have two tables T1 (the transactions table) and T2 (Master Table). I want to delete a record in the table T1 by checking conditions lies in table T2.
    I tried with the query below, but this request deletion of records in the table two.

    DELETE FROM (SELECT * high INNER JOIN T2 on T1 page TP)
    THE top. TID = TP. TID
    WHERE at the top. DEAL_SITE_ID = inputparameter1
    AND (TP. SEGMENT <>inputparameter2 OR tp.segment is not null));

    Here the record is deleted in the two tables, but I don't want to delete the data in my table master i.e table T2.

    Any help would be much appreciated. Thanks in advance.

    Kind regards
    Delphine
    SQL> select *
      2   from the_table;
    
    X          Y
    ---------- ----------
    AA         a
    BB         a
    CC         a
    AA         b
    DD         b
    
    SQL> select *
      2   from the_table_2;
    
    X          Y
    ---------- ----------
    AA         a
    BB         a
    CC         a
    
    SQL>  delete from
      2  (
      3  select *
      4  from the_table  t1 inner join the_table_2 t2
      5  on  t1.x = t2.x
      6  and t1.y = t2.y);
    
    3 rows deleted.
    
    SQL> select *
      2   from the_table;
    
    X          Y
    ---------- ----------
    AA         b
    DD         b
    
    SQL> select *
      2   from the_table_2;
    
    X          Y
    ---------- ----------
    AA         a
    BB         a
    CC         a
    
  • Delete the data in partitioned tables

    Hello

    Oracle 11.2.0.3.0 version, running on Linux Enterprise.

    I need to remove all the data from two tables (several 100 million lines each) that are partitioned.

    (1) table 1 is a partition table have varied to a DATE column

    (2) Table2 is a partition of reference table; partitioning is referenced on a relationship of foreign key to Table1 (column: key Table1.Primary)

    As I have no need for data, but want to keep the structure of the table, I would ideally like to delete partitions at the same time that the deletion of the data, so that the 2 tables partitioned and empty.

    Additionally, Table1 has some partitioned index I would be rebuilt as an index unpartitioned (given that Table1 will be empty).

    I thought I would start by removing all partitions of Table1 (via "ALTER TABLE DROP PARTITION nom_partition Table1"), but when the script came to the last partition, I got this error message:

    ORA-14083: cannot delete the only one partition of a partitioned table

    ORA-06512: at "SYS." DROP_PARTITIONS', line 46

    If someone could advise as to the best approach to what I want to achieve with regard to the two tables? Two tables down and recreate them then without partitions would be the easiest way?

    Thanks in advance for any guidance.

    If someone could advise as to the best approach to what I want to achieve with regard to the two tables? Two tables down and recreate them then without partitions would be the easiest way?

    Yes - delete the tables and re-create them.

    As says the exception that you cannot delete the last partition. A table is partitioned either or it is not.

    There was no interest at all to use DBMS_REDEFINITION to redefine tables because you do not want the data anyway.

  • Topics by opening the first occurrence in the table of contents

    Background: I created HTML5 Responsive help using HR 2015 for a web application. I organized the Hep role, then pages with these roles, users can access, and then by the tasks users can perform on this page. In many cases, a subject is listed under multiple roles and reuse and efficiency, I just dragged the same theme in the list of the topic in the table of contents as appropriate.

    I also used the text conditionalized on table of contents by role level. Using the example below, I have conditions for physician, nurse, and Patient, but I don't think that this is part of the issue well. Conditionalized roles were created for filtering purposes.

    Question: I have the overview topics that include hyperlinks to headings in red in the example below for each role. When a user clicks the hyperlink in this topic of presentation, he brings them to the FIRST occurrence of this topic in the table of contents, not the link that is associated with their role. When a user with the role of the Patient is in the topic view of their role and click the hyperlink 'Research for patients', help opens on this subject, but the "Searching for patients" in the topic role of physician in the table of contents on the left is highlighted.  Not a show-stopper, but it is confusing for users.

    Also, we had originally planned to use the filter feature to filter role help topics. When I filter to view only a specific role (nurse) and do the steps above, by clicking on the Preview 'Search for patients' hyperlink opens but there is no highlighting in the table of contents because this first occurrence is hidden in all the subjects physician.

    Note: This problem does not occur when I generate the content as WebHelp.

    What I want to do: When the nurse click on the hyperlink for 'Research for patients' of their overview topic, researching topic of patients is open and the search for patients is highlighted in the table of contents under the nurse, not the first occurrence (doctor).

    Questions: Is this a bug or is it repairable? And is it possible to fix it without creating the specific role of topics such as finding doctors for Patients, nursing research for Patients and so forth? I tried to delete the table of contents and start again, but the problem persists.

    Here is an example:

    Doctor

    Patient portal page

    Overview (contains links to sections below - view patient demograhic data, looking for patients, to renew orders)

    Display of the demographics of the patients

    Looking for patients

    Renewal of prescriptions

    Nurse

    Patient portal page

    Overview (contains links to sections below)

    Display of the demographics of the patients

    Looking for patients

    Display of orders

    Patient

    Patient portal page

    Overview (contains links to sections below)

    Update your demographic data

    Display of your prescrpitions

    My opinion would be that this is the expected behavior. My theory is that there is no information within the syntax of hyperlinks. A hypertext link is encoded such that when you click on it, you are taken to the landing page, as if sending the message "find the page named and post it by the specified parameters. What is happening is that the hyperlink goes to the first instance of the HTML page in your table of contents (.hhc file). There is no intelligence, he doesn't "know" that you are in the doctor or the nurse section - section he knows only that the page specified in the table of contents is listed in the file and thus, it only takes you there. The syntax of hyperlinks don't "know" where you are in the help system.

    I just also wanted to report the fault of strike in the Patient section, look a your orders of your example, assuming that you have copied and pasted into this thread.

  • want to remove the table in 10g

    Hi all;

    I was 1 million inserting dummy records in the table.

    Unfortunately, closed session without commit or rollback.

    > > now, I want to delete the table

    SQL > drop table petra.ycx;

    drop table petra.ycx

    *

    ERROR on line 1:

    ORA-00054: resource busy and acquire with NOWAIT specified

    SQL > select count (*) in the petra.ycx;

    COUNT (*)

    ----------

    2

    SQL > select a.sid, a.serial # session $ v a, v$ locked_object b, c dba_objects

    2 where b.object_id = c.object_id

    3 and a.sid = b.session_id and OBJECT_NAME = 'YCX. "

    SID, SERIAL #.

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

    11 159

    SQL > alter system kill session 11 159;

    alter system kill session 11 159

    *

    ERROR on line 1:

    ORA-00026: missing or not valid session ID

    The command is

    alter system kill session '159,11';
    

    Justin

  • Why can't remove the table?

    I find a table under soctt Solaris 11g, named BIN$ dnz9wkbnQZaxdctGcob3RA == $ 0, as follows:
    SQL > select * from tab;

    TNOM TABTYPE CLUSTERID

    BIN$ dnz9wkbnQZaxdctGcob3RA == $0 TABLE
    BONUS BOARD
    DEPT TABLE
    EMP TABLE
    SALGRADE TABLE

    I do not know when the table created, if I want to delete the table, can I use following command:
    SQL > drop table BIN$ dnz9wkbnQZaxdctGcob3RA == $0;
    drop table BIN$ dnz9wkbnQZaxdctGcob3RA == $0
    *
    Line 1 error:
    ORA-00933: SQL not correctly completed command.

    Why I can't remove this table? How to do?
    Thank you

    Handle: EdwardKing
    Status level: Beginner
    Join date: 27 May 2002
    Messages total: 61
    Total Questions: 24 (24 remaining)
    so many questions without answers ANY .
    :-(

    http://forums.Oracle.com/forums/Ann.jspa?annID=718

    Why I can't remove this table? How to do?

    When a table is dropped, it goes in the TRASH; It may therefore be FLASHBACK.

    What you're trying to DELETE a table already in the TRASH; is NOT authorized.

    When all else fails, read the Fine

    http://download.Oracle.com/docs/CD/B28359_01/server.111/b28310/tables011.htm#ADMIN11682

    Published by: sb92075 on February 11, 2011 17:47

  • Bigger disk-swapping, but down two, possible to remove them from the table, and then expand?

    I have a R710 with a PERC 6 / i, Win 2008 R2 running. I have a small disk for the operating system, the other 5 bays are filled with 1 TB disks in a RAID array-5.

    I need to add more storage, so I want to buy three discs of 3 TB. I plan on the withdrawal of old readers, and then put it in the new, bigger. I assume that it will take 1 of the 3 TB and repair. Leaving free 2 TB disk. Repeat this step twice more, which will result in three discs of 3TO with 6 TB of disk space not used in the RAID.

    Is it possible to have the controller expand storage in my table of RAID-5 existing free space, and then delete the two remaining 1 TB disks in the array?

    Who is? Is it still possible? Or do I have to backup the data on another storage device and delete the table and simply start a new one with the three discs of 3 TB and copy the data back?

    This will not work:

    (1) the PERC 6 won't take 3 TB drives; the maximum size is 2 TB.

    (2) you cannot delete records in a table - your RAID 5 5x1TB must always have records of 5 or more (you can add without deleting).  Even when using the same number of disks, isn't it possible to do the smaller table/VD.

    (3) even if you used 2 TB disks, there is no way to expand the RAID 5 using the extra space on the disks - with 5 disks in RAID 5, it will remain the same size. The only thing you can do with the new space is to create a second RAID array on the disks (called "slice").  This new VD is handled by the operating system as another "drive."

    Keep in mind if backup and restore in a larger painting, as if the VD ('disc') is greater than 2 TB, the disc "" MUST be converted to GPT and active UEFI bootmode (instead of BIOS).  Make sure that your backup software is capable of restoring one using the BIOS install on a system UEFI (and the 'disc' TPG 'disc' MBR).

  • Cannot delete the current row in the table in advance (the line above are deleted)

    Hi all

    I have an advanced table that contains say 5 records. Every row has sown delete icon. I suppose that if I click on the button Delete the current will be to remove. Now I have a problem if I remove the line 5, line 4 will remove. If I remove the line 3, line 2 is deleted. The line above the line to delete is removed by clicking on the button Delete.

    I had this procedure must manage the deletion (nothing wrong with that)

    public Boolean DeleteAuthorizedBudget() throws SQLException
    {
    Boolean rowFound = false;
    System.out.println ("DeleteAuthorizedBudget > >");
    try {}
    JcpaProjMtnReqBudgetVOImpl vo = getJcpaProjMtnReqBudgetVO1();
    vo.getCurrentRow () .remove ();
    Returns true;
    } catch (Exception e) {}
    e.printStackTrace ();
    } {Finally
    System.out.println ("DeleteAuthorizedBudget > >");
    }
    return (rowFound? Boolean.TRUE: Boolean.FALSE);

    }

    Concerning

    Laurent

    Cool. Then close the thread by checking the useful and accurate answers.

  • Delete rows in a table when the columns from two tables match

    Hello

    I have following two tables.

    ===========================================

    create the table empbooth as

    (

    Select 1 empid, 1 double cabin Union all the

    Select option 2, Union 1 double all the

    Select 3, Union 1 double all the

    Select option 4, Union 2 double all the

    Select option 5, 2 double

    );

    create the table attsht as

    (

    Select 1 empid, 240 reg, 0 unpaid all double union

    Select option 2, reg 200, 0 unpaid of all the double union

    Select 3, 240 reg, 0 unpaid all double them union

    Select 4 480 reg, 0 unpaid all double union

    Select 5 240 reg, unpaid double 0

    );

    =================================================

    I want to remove rows from attsht where corresponding booth (which is stored in the empbooth table) is 1.

    The condition is 'where attsht.empid = empbooth.empid and empbooth.booth = 1 '.

    I use oracle 10g.

    Help, please

    delete from attsht where a.empid in (select b.empid from empbooth b where b.booth = 1)

    or

    remove from attsht a

    where exists (select null

    of empbooth b

    where b.booth = 1

    and b.empid = a.empid)

  • How to capture what oracle object delete rows in the table?

    Hi all

    I have a table in which I am storing data deleted from the main table. I have a delete on the main table statements in the various packages, now I want to capture what sql statement what package is remove rows from the table. I created the trigger to insert data into the backup table. I'm using oracle 11g.

    Please help me...

    Thanks and greetings

    Vidyasagar.B

    You can use DBMS_UTILITY.FORMAT_CALL_STACK.
    
    SQL> create table t
      2  (
      3    no integer
      4  );
    
    Table created.
    
    SQL> create table t_log
      2  (
      3    str clob
      4  );
    
    Table created.
    
    SQL> create or replace trigger t_trig before insert on t
      2  begin
      3     insert into t_log(str) values (dbms_utility.format_call_stack);
      4  end;
      5  /
    
    Trigger created.
    
    SQL> create or replace procedure p
      2  as
      3  begin
      4    insert into t (no) values (1);
      5  end;
      6  /
    
    Procedure created.
    
    SQL> create or replace package pkg
      2  as
      3     procedure run;
      4  end;
      5  /
    
    Package created.
    
    SQL> create or replace package body pkg
      2  as
      3     procedure run
      4     is
      5     begin
      6       p;
      7     end;
      8  end;
      9  /
    
    Package body created.
    
    SQL> exec pkg.run
    
    PL/SQL procedure successfully completed.
    
    SQL> select * from t_log;
    
    STR
    --------------------------------------------------------------------------------
    ----- PL/SQL Call Stack -----
      object      line  object
      handle    number  name
    3abbbc6d8         1  anonymous block
    3ad03bf88         2  KARTHICK.T_TRIG
    3a51a18a8         4  procedure KARTHICK.P
    3ac4f1508         6  package body KARTHICK.PKG
    3ac91c250         1  anonymous block
    
  • LOV in richeTableau resets the value after the deletion of rows from the table

    Hello. I'm on 11g R2

    I have a table with columns in the box and a button in the toolbar that removes the lines checked

    I have build it based on the following article in her string code

    http://www.Oracle.com/technetwork/developer-tools/ADF/learnmore/index-101235.html


    When I run the "delete" button I execute the following code (taken as is article)


    public void deleteSelectedRows() {}

    create a second line, the value do not affect all lines

    used in ADF

    Set of rows duplicateRowSet = this.createRowSet ("duplicateRowSet");

    first row to avoid "the attempt to access the value of lines."

    exception line was dead.

    duplicateRowSet.first ();

    retrieve the current row of the table for after

    re-running the VO

    Line currentRow = this.getCurrentRow ();

    Boolean currentRowDeleted = false;

    get all rows that have the transoent attribute

    "MarkForDelete' set to true

    Row [] rowsToDelete =

    duplicateRowSet.getFilteredRows ("MarkedForDelete", true);

    If (rowsToDelete.length > 0) {}

    run only throizgh this code, if there is something to

    delete

    for (line rw: rowsToDelete) {}

    If the row is marked as the current in VO, ts value

    Boolean flag

    If (rw.getKey () .equals (currentRow.getKey ())) {}

    currentRowDeleted = true;

    }

    remove the line - do not yet commit

    RW. Remove();

    }

    rerun VO

    this.executeQuery ();

    reset the current line if it has not been removed

    If (! currentRowDeleted) {}

    this.setCurrentRow (currentRow);

    }

    duplicateRowSet.closeRowSet ();

    }

    }

    "MarkedForDelete" is a transient attribute used to mark the line delete

    The lines are removed very well.

    The problem is with lines that I do not delete.

    For example I LOV column. I chose the value LOV in a few lines, and after that choose to delete several lines (not the same lines where I modified the LOV) but some other lines.

    After I click "delete", the lines that I marked to remove deleted indeed, but the value of the LOV in other rows (I have not scored for delete) are disabled.

    How to preserve value LOV so it will remain also after I deleted some lines?

    P.S. I've tried autosubmit = "true" - it did not help

    It is expected because I see that you rerun the query.

    Once you re - run, it retrieves from the database again. Thus, your values are lost because they are not posted.

    I don't think that run query is necessary, try to have a programmatic part trigger on the table after you remove all of the lines.

    Thank you

    Alisson.

Maybe you are looking for