Sponsored Content
Top Forums Shell Programming and Scripting return number of rows selected Post 302102057 by apoorvasharma80 on Monday 8th of January 2007 07:25:25 AM
Old 01-08-2007
Hi Cbkihong!

I am also facing the same error. Can you please provide the information about what is the difference between $sth->numrows and $sth->rows.
Also I want to know if there is some restriction on the use of $sth->rows as I am also getting 0 even when there are rows in the database.

Kindly guide.

regards
Apoorva Kumar
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Cutting rows after a selected point

I have a log file from which I want to cut out the ten lines assoictiated to my search requirment (cust_ref #). The cust_ref number will be on te first line and the update information will be on the following ten lines (which dosen't linking data to grep on). Using a script I would like to... (4 Replies)
Discussion started by: nhatch
4 Replies

2. Shell Programming and Scripting

flags to suppress column output, # of rows selected in db2 sql in UNIX

Hello, I am new to db2 SQL in unix so bear with me while I try to explain the situation. I have a text file that has the contents of the where condition that I am using for a db2 SQL in UNIX ksh. Here is the snippet. if ; then echo "Begin processing VALUEs" ... (1 Reply)
Discussion started by: jerardfjay
1 Replies

3. Shell Programming and Scripting

print selected rows with awk

Hi everybody: Could anybody tell me how I can print from a file a selected rows with awk. In my case I only want print in another file all the rows from NR=8 to NR=2459 and the increment each 8 times. I tried to this: awk '{for (i=8; i=2459; i+=8); NR==i}' file1 > file2 But doesn't... (6 Replies)
Discussion started by: tonet
6 Replies

4. Shell Programming and Scripting

Return rows from Oracle package

I need help . I am not getting anything back from my setup. I have defined an oracle package which I am calling from within my sql call, but is returning no rows. If I run my sql from sqlplus works find, does not work whe I try to run from UNIX shell script My korn script test.ksh #!bin/ksh... (6 Replies)
Discussion started by: TimHortons
6 Replies

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

6. UNIX for Dummies Questions & Answers

Remove a newline char from selected rows.

Greetings! Can we automate the process of removing a newline char from selected rows in a fixed width file using a shell? Input is like abcd1234 xyzd1234 abcd a1b2c3d4 abcd1234 xyzd1234 xx abcd1234 Expected output - abcd1234xyzd1234 abcda1b2c3d4abcd1234xyzd1234 xxabcd1234 ... (2 Replies)
Discussion started by: mailme0205
2 Replies

7. Shell Programming and Scripting

Shell to remove a newline char from selected rows in a file.

Greetings! Can we automate the process of removing a newline char from selected rows in a fixed width file using a shell? Input is like abcd1234 xyzd1234 abcd a1b2c3d4 abcd1234 xyzd1234 xx abcd1234 Expected output - abcd1234xyzd1234 abcda1b2c3d4abcd1234xyzd1234 xxabcd1234 ... (3 Replies)
Discussion started by: mailme0205
3 Replies

8. Shell Programming and Scripting

To extract selected rows

Hi, I have two files Input1.txt and Input2.txt and i need to have a output with selected lines starting with the values present in Input2.txt. For example: Input1.txt:... (5 Replies)
Discussion started by: bhas
5 Replies

9. Shell Programming and Scripting

Combine multiple rows based on selected column keys

Hello I want to collapse a file with multiple rows into consolidated lines of entries based on selected columns as the 'key'. Example: 1 2 3 Abc def ghi 1 2 3 jkl mno p qrts 6 9 0 mno def Abc 7 8 4 Abc mno mno abc 7 8 9 mno mno abc 7 8 9 mno j k So if columns 1, 2 and 3 are... (6 Replies)
Discussion started by: linuxlearner123
6 Replies

10. UNIX for Beginners Questions & Answers

Reading and copying a selected rows

Dear All, I have a data file input.res like below. (Only six column shown here for example.) Sequence of first column starting from 1 to 148. Input file 1 Q0 9_August_2014_Entertainment2 0 20.14967806339729 BM25b1.0 1 Q0 13_October_2012_Page323 1 20.134224346765738 BM25b1.0 1 Q0... (2 Replies)
Discussion started by: imranrasheedamu
2 Replies
DBIx::Simple::Comparison(3)				User Contributed Perl Documentation			       DBIx::Simple::Comparison(3)

NAME
DBIx::Simple::Comparison - DBIx::Simple in DBI jargon DESCRIPTION
This is just a simple and inaccurate overview of what DBI things the DBIx::Simple things represent, or the other way around. This document can be useful to find the foo equivalent of bar. "?" means that DBI doesn't have an equivalent or that I couldn't find one. "=" means that DBIx::Simple provides a direct wrapper to the DBI function. "~" means that DBIx::Simple's method does more or less the same, but usually in a more high level way: context sensitive, combining things, automatically taking care of something. Note that DBIx::Simple is a wrapper around DBI. It is not "better" than DBI. In fact, DBIx::Simple cannot work without DBI. Using DBI directly is always faster than using DBIx::Simple's equivalents. (For the computer, that is. For you, DBIx::Simple is supposed to be faster.) Classes, common names use DBI ~ use DBIx::Simple $DBI::errstr = DBIx::Simple->error DBI::db ~ DBIx::Simple $dbh ~ $db $dbh->errstr = $db->error connect ~ connect connect ~ new DBI::st ~ DBIx::Simple::Result <undef> ~ DBIx::Simple::Dummy $sth ~ $result Queries DBI my $sth = $dbh->prepare_cached($query); $sth->execute(@values); ~ DBIx::Simple my $result = $db->query($query, $values); Results DBI DBIx::Simple bind_columns ~ bind fetchrow_arrayref/fetch = fetch fetchrow_array ~ list *1 ~ flat [@{fetchrow_arrayref}] = array fetchall_arrayref ~ arrays fetchrow_hashref() *2*3 = hash fetchall_arrayref({}) *4 ~ hashes fetchall_hashref *2 = map_hashes ? ? map_arrays fetchall_hashref(1) *2 = map $sth->{NAME_lc/NAME} = $result->columns *1 There's no fetch variant, but you can do "{ @{ $dbh->selectcol_arrayref('SELECT ...', { Slice => [] }) } }". *2 To receive the keys (column names) lowercased, use "$db->{FetchHashKeyName} = 'NAME_lc'". DBIx::Simple lower cases them by default. *3 Or supply an argument, 'NAME_lc'. *4 No, arrayref isn't a typo. When supplied an empty hash reference, DBI's fetchall_arrayref actually returns hashrefs. This DBI method does not support lower casing of keys, DBIx::Simple does. Direct access DBI DBIx::Simple $dbh = $db->dbh $sth->{$foo} = $result->attr($foo) func = func begin_work = begin_work commit = commit rollback = rollback last_insert_id = last_insert_id rows = rows disconnect ~ disconnect finish ~ finish DBIx::Simple specific (?) keep_statements lc_columns iquery (via SQL::Interp) select, insert, update, delete (via SQL::Abstract) abstract (via SQL::Abstract) flat hashes map_arrays map AUTHOR
Juerd Waalboer <juerd@cpan.org> <http://juerd.nl/> SEE ALSO
DBI, DBIx::Simple perl v5.16.3 2010-12-03 DBIx::Simple::Comparison(3)
All times are GMT -4. The time now is 05:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy