Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!unsvax!jimi!stevie!ray From: ray@stevie.cs.unlv.edu (Ray Tripamer) Newsgroups: comp.databases Subject: Re: Number of Rows from an Informix ESQL statement. Message-ID: <1428@jimi.cs.unlv.edu> Date: 18 Dec 89 18:18:57 GMT References: <590@aut.UUCP> <342@gtenmc.UUCP> Sender: news@jimi.cs.unlv.edu Reply-To: ray@jimi.cs.unlv.edu (Ray Tripamer) Organization: University of Nevada, Las Vegas Lines: 22 In article <342@gtenmc.UUCP> fst@gtenmc.UUCP (Fariborz Skip Tavakkolian) writes: >In article bochner@lange.harvard.edu (Harry Bochner) writes: >> >>... "select count(*) ...", >>Harry Bochner >>bochner@endor.harvard.edu > >extern struct sqlca_s sqlca; >printf ("Number of rows processed ... %d\n", sqlca.sqlerrd[2]); >Page 2-15 of (my) INFORMIX ESQL/C manual for version 2.10.XX ESQL/C > >Skip This doesn't apply to select statements. sqlca.sqlerrd[2] is only for delete and update statements. The "select count(*) ..." method is the only way I know of to get the number of rows that a select statement will find. -- Ray Tripamer ray@jimi.cs.unlv.edu