Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 26B829FB2E2 for ; Tue, 20 Mar 2007 08:55:44 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 17418-09 for ; Tue, 20 Mar 2007 08:55:40 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from bugs.unl.edu.ar (bugs.unl.edu.ar [168.96.132.208]) by postgresql.org (Postfix) with ESMTP id 859709FB2C2 for ; Tue, 20 Mar 2007 08:55:40 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by bugs.unl.edu.ar (Postfix) with ESMTP id 5B4576F922; Tue, 20 Mar 2007 08:55:38 -0300 (ART) Received: from bugs.unl.edu.ar ([127.0.0.1]) by localhost (bugs.unl.edu.ar [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uuEw4p5dBxcK; Tue, 20 Mar 2007 08:55:37 -0300 (ART) Received: by bugs.unl.edu.ar (Postfix, from userid 1000) id 282F86F91F; Tue, 20 Mar 2007 08:55:37 -0300 (ART) Received: from localhost (localhost [127.0.0.1]) by bugs.unl.edu.ar (Postfix) with ESMTP id 0B4E6FF3A; Tue, 20 Mar 2007 08:55:36 -0300 (ART) Date: Tue, 20 Mar 2007 08:55:36 -0300 (ART) From: Martin Marques To: Shavonne Marietta Wijesinghe cc: pgsql-sql@postgresql.org Subject: Re: Select and Count In-Reply-To: <005701c76ad8$8c4c7690$1102a8c0@dream> Message-ID: References: <005701c76ad8$8c4c7690$1102a8c0@dream> MIME-Version: 1.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.021 tagged_above=0 required=5 tests=AWL, BAYES_50 X-Spam-Level: Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE X-Archive-Number: 200703/271 X-Sequence-Number: 27909 On Tue, 20 Mar 2007, Shavonne Marietta Wijesinghe wrote: > Hello > > I have a postgresql table and i do a select via ASP > > strSQL =3D "SELECT * FROM " & MioTabella & " WHERE TRIM(date_inserted) >= =3D '" & datainizio & "' AND TRIM(date_inserted) <=3D '" & datafine & "'" > > oRs.open strSQL,oConn,3 > schede =3D oRs.RecordCount > > Do until oRs.EOF > sch_sin =3D cint(sch_sin) + cint(oRs("SCHE_SINGOLA").Value) > oRs.movenext > Loop I know nothing about ASP, but it looks like you are doing a SUM of an int= =20 with, maybe, an array (don't know how ASP defines oRs().Value output). Keep in mind that you are pulling all the columns of that table (as you=20 used a * in the column selection). Just a guess, nothing more then that. -- 21:50:04 up 2 days, 9:07, 0 users, load average: 0.92, 0.37, 0.18 --------------------------------------------------------- Lic. Mart=EDn Marqu=E9s | SELECT 'mmarques' || Centro de Telem=E1tica | '@' || 'unl.edu.ar'; Universidad Nacional | DBA, Programador, del Litoral | Administrador ---------------------------------------------------------=