Questions tagged [rowcount]

405 questions
0
votes
2 answers

SSIS - write flat file header containing rowcount of the data file

I am creating an SSIS package that will write in the header of a text file STARTDATE|ENDDATE|ROWCOUNT followed by the results of a stored procedure. ROWCOUNT is the number of rows in the data set from the stored procedure. The data set is written…
0
votes
3 answers

Select all Table/View Names with each table Row Count in Teredata

I have been stuck into a question. The question is I want to get all Table name with their Row Count from Teradata. I have this query which gives me all View Name from a specific Schema. I ] SELECT TableName FROM dbc.tables WHERE tablekind='V'…
vrivrivri
  • 189
  • 1
  • 3
  • 13
0
votes
1 answer

How to create Row Count on a table which already has records in it?

I have a table with 5000 rows already populated in a table. I have a column called SEQN. I would like to populate this column with a Row Count. I am using: Microsoft SQL Server Management Studio 9.00.4035.00 Microsoft Analysis Services Client Tools…
0
votes
4 answers

PDO rowCount() works on MySQL but not in SQL Server 2008 R2

I have a problem when I get number of rows in SQL Server 2008 because my code works fine using MySQL but not in SQL Server. $sql = "SELECT TOP 1 U.Id , U.Name, U.Profile, P.Name NameProfile FROM sa_users U INNER JOIN sa_profiles P…
SoldierCorp
  • 7,610
  • 16
  • 60
  • 100
0
votes
2 answers

Return new query if rowcount = 0

How can I return a new query if my first query didn't return anything? I'm using ssis to execute a stored procedure, if the stored procedure didn't return anything it should pass a new query that will be then saved to a new ole db…
anonymous1110
  • 885
  • 4
  • 14
  • 28
0
votes
2 answers

Retrieve Row Count from a SqlDataSource by converting into a DataView

I had some difficulties to retrieve the Total Row Count from a SqlDataSource. I used the results from the SELECT statement in the SqlDataSource to create a ListView, but got stuck to produce some code that would let me easily get the Total Row…
Marcellino Bommezijn
  • 2,889
  • 1
  • 16
  • 14
0
votes
1 answer

How to access task (DFT) level variable in SSIS in case same name variable? I seem to be accessing package level variable in Conditional split

I have 2 varaibles name Row_Count 1st at package level and 2nd at task level and both have default value zero. I have assigned variable value through Row Count Transformation and checked it for condtion in conditional split. It seems in Row Count…
Pritesh
  • 1,938
  • 7
  • 32
  • 46
0
votes
1 answer

How to get number of rows with fetchColumn and bindParam

Why does this not work $sth = $pdo->prepare("SELECT * FROM tempusers WHERE tempusers.username = :username AND tempuser.email = :email AND password = :password"); $sth->bindParam(':username', $register_data['username'], PDO::PARAM_STR); …
user747796
  • 51
  • 1
  • 4
  • 9
0
votes
1 answer

Retrieve a select count(*) in Oracle inside a cursor

I need to retrieve the number of rows in a SELECT COUNT(*) statement that is inside a cursor (in Oracle). The following code should explain it clearly: PROCEDURE Save(CF_CURSOR OUT "VPA"."CF_#Runtime".CF_CURSOR_TYPE) AS V_CF_CURSOR…
Vincium
  • 3
  • 1
  • 2
0
votes
1 answer

Detect error vs. unaffected row with PHP PDO rowCount()

Using PHP PDO, is there a way to distinguish the difference between an UPDATE failing, and an UPDATE running successfully but setting a field to its existing value? $sql = 'UPDATE table SET column = :column WHERE id = :id'; $statement =…
Ed Brissenden
  • 177
  • 2
  • 13
0
votes
2 answers

Server-side Pagination: total row count for expensive query?

I have a simple query using server-side pagination. The issue is the WHERE Clause makes a call to an expensive function and the functions argument is the user input, eg. what the user is searching for. SELECT * FROM ( SELECT /*+…
beginner_
  • 7,230
  • 18
  • 70
  • 127
0
votes
2 answers

PHP PDO Row Counting

i want to check the rows if there are any events that are binded to a host with host_id parameter, everything is well if there is not any events binded to a host, its printing out none, but if host is binded to one of the events, its not listing the…
user1621727
0
votes
2 answers

Trying to check if email already exists on database

I am trying to check an email address against ones listed in a database to make sure it doesn't match any. I have attempted to use rowCount which I understand returns a bool true or false on whether it found a match. But the email address still gets…
crmepham
  • 4,676
  • 19
  • 80
  • 155
0
votes
1 answer

query to read a column excel worksheet with OLEDB

I'm totally new with OleDB and reading excel files. I have a worksheet with 3 columns (Name - Surname - E-mail Address) and I need to: know the rows number read all the addresses in the third columns extract one by one each address I use an…
Frank Lioty
  • 949
  • 3
  • 10
  • 17
-1
votes
1 answer

SQL alternative for fetching latest record of each item in a table using partition

Im have been query the database to collectively fetch latest record or each item using PARTITION and ROW_COUNT() which works on MariaDB version 10.4* but i want to query the same on a MySQL version 5.7* database but it doesn't work there. I would…
Mariwa
  • 45
  • 5
1 2 3
26
27