Received: from vpcit.ru (qmailr@dialup.vpcit.ru [195.38.52.246]) by hub.org (8.10.1/8.10.1) with SMTP id e7P3XM572275 for ; Thu, 24 Aug 2000 23:33:22 -0400 (EDT) Received: (qmail 27082 invoked from network); 25 Aug 2000 03:32:15 -0000 Received: from nt2.vpcit.ru (HELO vpcit.ru) (195.38.52.235) by dialup.vpcit.ru with SMTP; 25 Aug 2000 03:32:15 -0000 Message-ID: <39A5E877.537238D6@vpcit.ru> Date: Fri, 25 Aug 2000 09:31:03 +0600 From: Yury Don Organization: gercon X-Mailer: Mozilla 4.74 [en] (X11; U; Linux 2.2.15 i686) X-Accept-Language: ru, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: [GENERAL] Getting the result of a query using COUNT(*) References: <200008250937570530.005FD1CF@mail.imvi.com.ph> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200008/273 Jackson Ching wrote: > > Hi, > > I'm using JSDK 2.0 and IBM JDK 1.3 on RedHat Linux 6.2 > > As i test my servlet, I got errors saying count(*) column not found in a query like this > > SELECT COUNT(*) FROM MyTable > > in my rs.getint("COUNT(*)"); in oracle it works fine, in postgresql it doesn't. how should i handle aggregate functions in SQL then? > > Thanks > > Jackson What version of rostgres do you use? SELECT COUNT(*) FROM MyTable works pretty well in postgres 6.5.1 and later. Perhaps problem is in java? -- Sincerely yours, Yury