Received: from c3.vin.directi.com ([203.199.75.159]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f55ApkE40255 for ; Tue, 5 Jun 2001 06:51:46 -0400 (EDT) (envelope-from azaidi@directi.com) Received: from default ([203.199.106.4]) by c3.vin.directi.com (8.10.2/8.10.2) with SMTP id f55Au0T20600 for ; Tue, 5 Jun 2001 16:26:01 +0530 Message-ID: <006a01c0edad$9fd16800$4301a8c0@directi.com> From: "Arsalan Zaidi" To: Subject: query works in psql, but not thru JDBC Date: Tue, 5 Jun 2001 16:22:27 +0530 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Archive-Number: 200106/17 X-Sequence-Number: 1679 Hi. I'm running this query, which is constructed from parameters passed to a function. SELECT * FROM users WHERE userid = 4 ORDER BY name LIMIT 20 OFFSET 0 When I run it from the command line inpsql, It works just fine, but when I run it using the Postgresql JDBC driver (executeQuery()), I get this error ------------------------ Err Mesg : ERROR: Attribute users.name must be GROUPed or used in an aggregate function SQL State : NULL Error Code : 0 ------------------------ Why does it work from the command line and not through JDBC? Thanks in advance. --Arsalan.