dbTalk Databases Forums  

getting the number of returned rows from a select query

comp.databases.informix comp.databases.informix


Discuss getting the number of returned rows from a select query in the comp.databases.informix forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Gentian Hila
 
Posts: n/a

Default getting the number of returned rows from a select query - 02-11-2010 , 05:49 PM






I am creating a stored procedure (in IDS 9.40) which among other
others has a SELECT query. The flow of the procedure depends on the
number of results returned by the query.

Also the query populates some variables so I have to run a query and
not a count query.

Is there any way to get the number of results returned without having
to run a second query with a count in it?

Thank you,

Reply With Quote
  #2  
Old   
Fernando Nunes
 
Posts: n/a

Default Re: getting the number of returned rows from a select query - 02-11-2010 , 06:28 PM






Please check:

http://publib.boulder.ibm.com/infoce...%66%6f%22 %20

DBINFO('sqlca.sqlerrd2')

It shoud give you what you need
Regards,


On Thu, Feb 11, 2010 at 10:49 PM, Gentian Hila <genti.tech (AT) gmail (DOT) com> wrote:

Quote:
I am creating a stored procedure (in IDS 9.40) which among other
others has a SELECT query. The flow of the procedure depends on the
number of results returned by the query.

Also the query populates some variables so I have to run a query and
not a count query.

Is there any way to get the number of results returned without having
to run a second query with a count in it?

Thank you,
_______________________________________________
Informix-list mailing list
Informix-list (AT) iiug (DOT) org
http://www.iiug.org/mailman/listinfo/informix-list



--
Fernando Nunes
Portugal

http://informix-technology.blogspot.com
My email works... but I don't check it frequently...

Reply With Quote
  #3  
Old   
Gentian Hila
 
Posts: n/a

Default Re: getting the number of returned rows from a select query - 02-11-2010 , 08:26 PM



Thank you very much to both of you who answered,

That did the trick.



On Thu, Feb 11, 2010 at 6:28 PM, Fernando Nunes <domusonline (AT) gmail (DOT) com> wrote:
Quote:
Please check:

http://publib.boulder.ibm.com/infoce...%66%6f%22 %20

DBINFO('sqlca.sqlerrd2')

It shoud give you what you need
Regards,


On Thu, Feb 11, 2010 at 10:49 PM, Gentian Hila <genti.tech (AT) gmail (DOT) com> wrote:

I am creating a stored procedure (in IDS 9.40) *which among other
others has a SELECT query. The flow of the procedure depends on the
number of results returned by the query.

Also the query populates some variables so I have to run a query and
not a *count query.

Is there any way to get the number of results returned without having
to run a second query with a count in it?

Thank you,
_______________________________________________
Informix-list mailing list
Informix-list (AT) iiug (DOT) org
http://www.iiug.org/mailman/listinfo/informix-list



--
Fernando Nunes
Portugal

http://informix-technology.blogspot.com
My email works... but I don't check it frequently...

_______________________________________________
Informix-list mailing list
Informix-list (AT) iiug (DOT) org
http://www.iiug.org/mailman/listinfo/informix-list


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.