Output number of rows inserted, updated...


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Output number of rows inserted, updated...
# 1  
Old 01-30-2008
MySQL Output number of rows inserted, updated...

Hi all,
I am new to Unix.

I have written pl/sql script to be run in Unix.
I have used Merge statement and subsequently would like to know the number of rows updated or inserted.

Any suggestions in this regard would be great

Thanks in advance
Kushal
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Compare two and write updated output in third file

Hi Linux Experts. I have a requirement where i need to update the thousands of table definitions to extend the column length and character set therefore i am looking for some sort of linux script which i can use to update the length and chacterset. I have two files In first file i have 7... (1 Reply)
Discussion started by: Black-Linux
1 Replies

2. Shell Programming and Scripting

Number of rows loaded via sqlldr

Hi all, I'm loading data in database through sqlldr. I want to know the total record count And the number of records inserted in table.. what is the logic to achieve that. Thanks (5 Replies)
Discussion started by: Pratiksha Mehra
5 Replies

3. Shell Programming and Scripting

Comparing two files to get only records to be inserted and updated

Hello all, Please help me for a script that compares two files and reads only those records that are to be inserted and updated. File1: c_id name place contact_no 1 abc xyz 34567 10 efg uvw 82725 6 hjk wth 01823 2 iuy ... (4 Replies)
Discussion started by: T@ni@
4 Replies

4. 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

5. 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

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. UNIX for Dummies Questions & Answers

how to capture no. of rows updated in update sql in unix db2

hi, i am a new user in unix..and we have unix db2. i want to capture the no. of rows updated by a update db2 sql statement and redirect into a log file. I've seen db2 -m...but not sure how the syntax should be. The update sql that I'm going to run is from a file... Can you please share... (1 Reply)
Discussion started by: j_rymbei
1 Replies

8. Shell Programming and Scripting

Diff Command to return the number of lines inserted,deleted and changed.

Hello, I have to compare two files file1 and file2, retrieve the number of lines modified (added, deleted or modified) in file2. Output must be like: File2: Added Deleted Changed Total ------ ------- -------- ----- 2 1 1 4 Somebody... (2 Replies)
Discussion started by: nmattam
2 Replies

9. Shell Programming and Scripting

How can i extarct the output from a file which has been updated from last half an hou

hi, I have a log file , which is appending with current data i need the extarct which is updated from last 30 minutes the format of the date is Jun 18, 2008 8:59:18 AM how can i subtract 30 mins from the current date thanks Tarun. (5 Replies)
Discussion started by: tarundeepdhawan
5 Replies

10. 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
Login or Register to Ask a Question
INGRES_NUM_ROWS(3)							 1							INGRES_NUM_ROWS(3)

ingres_num_rows - Get the number of rows affected or returned by a query

SYNOPSIS
int ingres_num_rows (resource $result) DESCRIPTION
This function primarily is meant to get the number of rows modified in the database. However, it can be used to retrieve the number of rows to fetch for a SELECT statement. Note If scrollable cursors are disabled and this function is called before using ingres_fetch_array(3), ingres_fetch_object(3), or ingres_fetch_row(3), the server will delete the result's data and the script will be unable to get them. Instead, you should retrieve the result's data using one of these fetch functions in a loop until it returns FALSE, indicating that no more results are available. PARAMETERS
o $result - The result identifier for a query RETURN VALUES
For delete, insert, or update queries, ingres_num_rows(3) returns the number of rows affected by the query. For other queries, ingres_num_rows(3) returns the number of rows in the query's result. SEE ALSO
ingres_query(3), ingres_fetch_array(3), ingres_fetch_assoc(3), ingres_fetch_object(3), ingres_fetch_row(3). PHP Documentation Group INGRES_NUM_ROWS(3)