Questions tagged [rowcount]
405 questions
6
votes
2 answers
Get number of records deleted sql
I want to get the row count of how many records have been deleted. The below query returns the number of records that will be affected, but
SELECT COUNT(*) FROM suppliers
WHERE EXISTS
( SELECT customers.customer_name
FROM customers
WHERE…

user525146
- 3,918
- 14
- 60
- 103
6
votes
3 answers
Get the Azure table Row count
I am new to Azure table storage. I want to get the total row count in a table.
Currently Iam doing something like this:-
public List ReadAll(string partitionKey)
{
List entities = new List();
TableQuery query = new…

HappyCoder
- 75
- 1
- 1
- 6
6
votes
5 answers
How to count total number of rows of table in Cakephp
How to count the total number of rows of table and pass it to the variable? For example, I have product table and there are 10 products in it. I want to count all the rows and get the result 10 and pass it to the variable $rowcount. How can I do it?

Patrick
- 93
- 1
- 2
- 6
6
votes
2 answers
PDO/MySQL rowCount not returning as expected
Post-answer edit: I think this was a bug in my own code -- I don't know what it was but I proceeded to fix it. See answer below.
I'm using MySQL/PHP to perform a series of INSERT ... ON DUPLICATE KEY UPDATE statements. The documentation I've read…

Christian Sieber
- 63
- 5
5
votes
1 answer
Unexpected row count when using PostgreSQL trigger and hibernate
I have an application which uses Hibernate and I have to include a trigger to copy to a history table all rows modified or deleted in a table. After including the PostgreSQL trigger the application doesn't work properly and is giving this…

Javi
- 19,387
- 30
- 102
- 135
5
votes
1 answer
SqlAlchemy StaleDataError returns -1 when update record on mssql
I'm using flask-sqlalchemy to update mssql record, but it returns -1.
Library versions:
SQLAlchemy 1.3.11
Flask-SQLAlchemy 2.4.1
pyodbc 4.0.27
flask 1.1.1
Code part 1:
ret =…

希德尼娅的骑士
- 51
- 2
5
votes
2 answers
Row count from OracleDataReader
Can any one tell me how to find row count from OracleDataReader in .net 2.0?

Pradeep
- 4,612
- 10
- 38
- 50
5
votes
2 answers
SSIS Row Count For All Files Within a Folder
I have a folder which contains multiple Excel files that are replaced daily. I need a total row count that gives me the sum of row counts from each individual Excel file within the folder (i.e. if there are 3 files with 10 records each, I need a…

Alex
- 107
- 3
- 8
5
votes
3 answers
QFileSystemModel rowCount does not work as expected
I am try an example in Model/View Programming.
http://doc.qt.io/qt-5/model-view-programming.html
To demonstrate how data can be retrieved from a model, using model indexes, we set up a QFileSystemModel without a view and display the names of files…

tom
- 1,302
- 1
- 16
- 30
5
votes
1 answer
JavaFX-8 - How to get the row count of a TableView?
How is it possible to get the number of rows of a TableView in a TableCell? I tried .getTableRow(), but that isn't what I need. I need it to find out, if the TableCell is the last Cell in the TableView.
Or is there another way to figure this…

S.Pro
- 633
- 2
- 12
- 23
5
votes
2 answers
PHP PDO MySQL Correct way to check if an update query succeeded when no rows are affected
What is a sure way to tell if an update query succeeded when using php pdo and mysql?
In my app, I update totals of items that are submitted but a user, and the table looks like this:
items
userId | itemsAdded | itemsChecked | itemsUnChecked |…

jmenezes
- 1,888
- 6
- 28
- 44
5
votes
1 answer
NHibernate: How to select the root entity in a projection
Ayende describes a really great way to get page count, and a specific page of data in a single query here:
http://ayende.com/blog/2334/paged-data-count-with-nhibernate-the-really-easy-way
His method looks like:
IList list =…

jonh
- 233
- 1
- 10
5
votes
2 answers
Row count of a stored procedure from another stored procedure
I have various stored procedures. I need a stored procedure to execute a stored procedure and then return only the row count (number of returned rows by the called procedure) and I need to receive it in c# code.
What's the best way to do this?
user1711245
5
votes
1 answer
Find row number in a sort based on row id, then find its neighbours
Say that I have some SELECT statement:
SELECT id, name FROM people
ORDER BY name ASC;
I have a few million rows in the people table and the ORDER BY clause can be much more complex than what I have shown here (possibly operating on a dozen…

Pierre Arnaud
- 10,212
- 11
- 77
- 108
4
votes
1 answer
ToRowCountQuery seems to ignore groupings
I'm trying to create a rowcount-query from a regular query, but the resulting SQL seems to lack the GROUP BY resulting in a wrong count. Does anyone know what I'm doing wrong.
First the queries:
var query =…

Pieter
- 3,339
- 5
- 30
- 63