Sponsored Content
Top Forums Shell Programming and Scripting Number of rows loaded via sqlldr Post 302902191 by clx on Monday 19th of May 2014 09:18:27 AM
Old 05-19-2014
You have 30 posts now. By now you should be aware that :

- always use code tags to post your data.
- create a new thread for new topic.


About your question, please make sure you don't have any blank line in the file.
This User Gave Thanks to clx For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

help getting records loaded from sqlldr log

Does anyone have the code to look in a slqldr log file and get the total amount of records loaded? If so, could you please post. Thanks much. (0 Replies)
Discussion started by: ecupirate1998
0 Replies

2. Shell Programming and Scripting

return number of rows selected

Hi all, i am doing a perl script to read from a db. I am able to retrieve the rows, but i am unable to return the number of rows selected. i tried $selectedrows = $sth->numrows; i got the error msg: Can't locate object method "numrows" via package "DBI::st" i changed it to $selectedrows =... (7 Replies)
Discussion started by: new2ss
7 Replies

3. Shell Programming and Scripting

Ability to store number of rows

Hi, I am creating a korn shell script and i'm trying to find out what the total number of rows are in a specific text file and i need to store that number in a variable withing the script. i know wc -l gives you the number, but it also has some leading spaces and then writes out the file name... (2 Replies)
Discussion started by: scabral
2 Replies

4. UNIX for Dummies Questions & Answers

Number Grouped Rows in File

I have a file containing 750,000 records and have managed to sort them by related columns and now i'd like to add an ID number to the front of each line of the records that are grouped together. Which probably makes no sense so i have provided some example data and desired result. Given data.txt... (2 Replies)
Discussion started by: RacerX
2 Replies

5. Shell Programming and Scripting

How to get total records loaded from sqlldr log file

Hi, I am loading data in the database table through sqlldr. I have to find total records loaded from sqlldr log file and store it in a variable in my script. How do I get it? Thank you. (3 Replies)
Discussion started by: mrpranab
3 Replies

6. Shell Programming and Scripting

how to add the number of row and count number of rows

Hi experts a have a very large file and I need to add two columns: the first one numbering the incidence of records and the another with the total count The input file: 21 2341 A 21 2341 A 21 2341 A 21 2341 C 21 2341 C 21 2341 C 21 2341 C 21 4567 A 21 4567 A 21 4567 C ... (6 Replies)
Discussion started by: juelillo
6 Replies

7. Shell Programming and Scripting

awk number rows from 1 to 3 in file

I have a file with the following format, i need to change de field9 each 3 rows to renumber field9 with gpo1, gpo2, gpo3. I need to use awk Original file field1 field2 field3 field4 field5 field6 field7 field8 gpo3 field1 field2 field3 field4 field5 ... (3 Replies)
Discussion started by: robonet
3 Replies

8. Shell Programming and Scripting

Delete rows with particular number of columns

Hello Guys I have a flat file with few thousands of rows. Now each rows have different number of columns I want to delete the rows which has not equal to 749 columns Can you guys please let me know how to do the same Your help is much appreciated. (2 Replies)
Discussion started by: Pratik4891
2 Replies

9. Shell Programming and Scripting

extracting number of rows

if > wc -l data.txt > 100 (meaning there are 100 rows) i want to assgn 100 as n so that if i do >echo n it would give me 100 Thanks (5 Replies)
Discussion started by: johnkim0806
5 Replies

10. Shell Programming and Scripting

SQLLDR :Data not loaded completely

Hi , I am using below control file LOAD DATA APPEND INTO TABLE LSHADMIN.EG TRAILING NULLCOLS ( STUDY CHAR ) and the text file to load data is CACZ885M2301 When I run below command: sqlldr userid=apps/apps control=/home/appsuser/dataload/ctl_file.ctl... (3 Replies)
Discussion started by: Pratiksha Mehra
3 Replies
MYSQL_AFFECTED_ROWS(3)							 1						    MYSQL_AFFECTED_ROWS(3)

mysql_affected_rows - Get number of affected rows in previous MySQL operation

SYNOPSIS
Warning This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQL extension should be used. See also MySQL: choosing an API guide and related FAQ for more information. Alternatives to this function include: omysqli_affected_rows(3) o PDOStatement::rowCount int mysql_affected_rows ([resource $link_identifier = NULL]) DESCRIPTION
Get the number of affected rows by the last INSERT, UPDATE, REPLACE or DELETE query associated with $link_identifier. o $ link_identifier -The MySQL connection. If the link identifier is not specified, the last link opened by mysql_connect(3) is assumed. If no such link is found, it will try to create one as if mysql_connect(3) was called with no arguments. If no connection is found or established, an E_WARNING level error is generated. Returns the number of affected rows on success, and -1 if the last query failed. If the last query was a DELETE query with no WHERE clause, all of the records will have been deleted from the table but this function will return zero with MySQL versions prior to 4.1.2. When using UPDATE, MySQL will not update columns where the new value is the same as the old value. This creates the possibility that mysql_affected_rows(3) may not actually equal the number of rows matched, only the number of rows that were literally affected by the query. The REPLACE statement first deletes the record with the same primary key and then inserts the new record. This function returns the number of deleted records plus the number of inserted records. In the case of "INSERT ... ON DUPLICATE KEY UPDATE" queries, the return value will be 1 if an insert was performed, or 2 for an update of an existing row. Example #1 mysql_affected_rows(3) example <?php $link = mysql_connect('localhost', 'mysql_user', 'mysql_password'); if (!$link) { die('Could not connect: ' . mysql_error()); } mysql_select_db('mydb'); /* this should return the correct numbers of deleted records */ mysql_query('DELETE FROM mytable WHERE id < 10'); printf("Records deleted: %d ", mysql_affected_rows()); /* with a where clause that is never true, it should return 0 */ mysql_query('DELETE FROM mytable WHERE 0'); printf("Records deleted: %d ", mysql_affected_rows()); ?> The above example will output something similar to: Records deleted: 10 Records deleted: 0 Example #2 mysql_affected_rows(3) example using transactions <?php $link = mysql_connect('localhost', 'mysql_user', 'mysql_password'); if (!$link) { die('Could not connect: ' . mysql_error()); } mysql_select_db('mydb'); /* Update records */ mysql_query("UPDATE mytable SET used=1 WHERE id < 10"); printf ("Updated records: %d ", mysql_affected_rows()); mysql_query("COMMIT"); ?> The above example will output something similar to: Updated Records: 10 Note Transactions If you are using transactions, you need to call mysql_affected_rows(3) after your INSERT, UPDATE, or DELETE query, not after the COMMIT. Note SELECT Statements To retrieve the number of rows returned by a SELECT, it is possible to use mysql_num_rows(3). Note Cascaded Foreign Keys mysql_affected_rows(3) does not count rows affected implicitly through the use of ON DELETE CASCADE and/or ON UPDATE CASCADE in for- eign key constraints. mysql_num_rows(3), mysql_info(3). PHP Documentation Group MYSQL_AFFECTED_ROWS(3)
All times are GMT -4. The time now is 10:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy