Re: [Q] Pro*C: How many rows selected?

From: Jessica Cook <jcook_at_imtn.dsccc.com>
Date: 1995/10/11
Message-ID: <45g54i$745_at_tpd.dsccc.com>#1/1


I would say it common to SELECT count(*) before you open the CURSOR but this is typically done to no if it's even worth opening. You could put a counter in and increment after each FETCH.

Jessica Cook

Saad Ahmad (sahmad_at_mfa.com) wrote:
: Wolfgang Schnabl (schnabl_at_aut.alcatel.at) wrote:
: > A Pro*C question:
: > Is there a possibility to get the number of rows selected after an
: > OPEN CURSOR statement *before* doing a FETCH?
: > (after the FETCH I can see the fetched rows in sqlca.sqlerrd[2]).
: This would not tell you the total rows fetched after the
: first fetch.
 

: > or do I have to use "SELECT count(*)" first, which means actually doing
: > the same call twice?
: i think so
 

: --
: **************************************************************
: * Saad Ahmad *
: * McHugh Freeman & Associates, Inc. *
: * Ph: (414) 798-8606 Ext. 457 *
: * Fax: (414) 798-8619 *
: * E-Mail: sahmad_at_mfa.com *
: **************************************************************
Received on Wed Oct 11 1995 - 00:00:00 CET

Original text of this message