Questions tagged [delete-row]

Delete row refers to the removal of rows from a relational database.

The deletion can be achieved by using the DELETE statement of the SQL language.

1917 questions
10
votes
3 answers

How to Delete Rows CSV in python

I'm trying to compare two csv files (fileA and fileB), and remove any rows from fileA that are not found in fileB. I want to be able to do this without creating a third file. I thought I could do this using the csv writer module but now I'm second…
justin
  • 135
  • 1
  • 2
  • 6
9
votes
5 answers

sheet.deleteRows() - Need to delete all the rows with data from top (preferably from 2nd row)

I need to delete 200-300 rows, excluding row 1. The script below is getting an out of bounds error, and it's slow. Can someone help with a way to speed up the process? ** IF POSSIBLE EXCLUDE ROW_1 function clearRange() { var sheet =…
rockinfreakshow
  • 15,077
  • 3
  • 12
  • 19
9
votes
4 answers

How can I delete rows and columns from 2D array in C#?

How to delete a specific row and column from 2D array in C#? int[,] array= {{1,2,3},{4,5,6},{7,8,9}}; lets say I want to delete row i and column i (skipping them) ... for nXn array not just 3x3 and store the remaining array in a new array... so…
WT86
  • 823
  • 5
  • 13
  • 34
9
votes
2 answers

How to delete using only the primary key?

How do I delete a record using Linq to SQL using only the primary key, without having to retrieve the existing record from the database?
Jeremy
  • 44,950
  • 68
  • 206
  • 332
9
votes
4 answers

How do I delete a row in a numpy array which contains a zero?

I'm trying to write a function to delete all rows in which have a zero value in. This is not from my code, but an example of the idea I am using: import numpy as np a=np.array(([7,1,2,8],[4,0,3,2],[5,8,3,6],[4,3,2,0])) b=[] for i in…
Ashleigh Clayton
  • 1,443
  • 8
  • 23
  • 32
9
votes
2 answers

The GridView 'PendingRecordsGridview' fired event RowDeleting which wasn't handled

I've searched in google there's an easy way to delete a record with confirmation using this code:
Peterson Pilares
  • 283
  • 3
  • 7
  • 21
9
votes
5 answers

MySQL Query to delete rows whose timestamp is older than current timestamp

I am looking for a query that is able to delete all rows from a table in a database where timestamp is older than the current date/time or current timestamp. Would really appreciate some help out here urgently! Here's the query I am using but as I…
Arihant
  • 3,847
  • 16
  • 55
  • 86
8
votes
2 answers

Simple delete query using EF Code First

Is there any way to accomplsig something simple as this using EF Code First DELETE FROM Order WHERE OrderDate >= @minOrderDate AND OrderDate >= @maxOrderDate I have a table of which I would like to delete at least 10.000 records. I think it would…
jhoefnagels
  • 359
  • 1
  • 7
  • 21
8
votes
8 answers

Delete a row from a SQL Server table

I'm trying to simply delete a full row from my SQL Server database table using a button event. So far none of my attempts have succeeded. This is what I'm trying to do: public static void deleteRow(string table, string columnName, string…
ikathegreat
  • 2,311
  • 9
  • 49
  • 80
8
votes
3 answers

whereArgs SQLite database delete

I'm trying to remove a couple of rows in a sqlite database programmatically for android and am wondering what the whereArgs are referring to in this documentation:…
locoboy
  • 38,002
  • 70
  • 184
  • 260
8
votes
2 answers

Query to delete all rows in a table hibernate

I am trying to delete all rows in table 'user_role' with hibernate query. But every time i am getting errors. Can someone please help me with it. DaoImpl @Override public void deleteAll() { session.getCurrentSession().delete(/*delete all…
Sanjay Kumar
  • 415
  • 4
  • 9
  • 19
8
votes
2 answers

Delete from table A joining on table A in Redshift

I am trying to write the following MySQL query in PostgreSQL 8.0 (specifically, using Redshift): DELETE t1 FROM table t1 LEFT JOIN table t2 ON ( t1.field = t2.field AND t1.field2 = t2.field2 ) WHERE t1.field > 0 PostgreSQL 8.0 does not…
moinudin
  • 134,091
  • 45
  • 190
  • 216
8
votes
4 answers

How to delete duplicated rows based in a column value?

Given the following table 123456.451 entered-auto_attendant 123456.451 duration:76 real:76 139651.526 entered-auto_attendant 139651.526 duration:62 real:62` 139382.537 entered-auto_attendant Using a bash shell script based in Linux, I'd like…
user3494949
  • 91
  • 1
  • 2
  • 4
8
votes
1 answer

Excel VBA: Delete entire row if cell in column A is blank (Long Dataset)

I am trying to delete all rows that have blank cells in column A in a long dataset (over 60 000 rows in excel) I have a VBA code that works great when I have less then aprox 32 000 cells: Sub DelBlankRows() Columns("A:A").Select …
user1783504
  • 331
  • 4
  • 7
  • 14
8
votes
2 answers

Delete statement - Sub Query should throw error

I have created two tables, T1 and T2 with one column each, abc and xyz respectively. I have inserted 2 rows (numeric values 1 and 2) in each table. When I run the command "select abc from t2", it throws an error saying that column abc does not exist…
Orangecrush
  • 1,970
  • 2
  • 15
  • 26