Select and Count

From: "Shavonne Marietta Wijesinghe" <shavonne(dot)marietta(at)studioform(dot)it>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Select and Count
Date: 2007-03-20 10:14:29
Message-ID: 005701c76ad8$8c4c7690$1102a8c0@dream
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello

I have a postgresql table and i do a select via ASP

strSQL = "SELECT * FROM " & MioTabella & " WHERE TRIM(date_inserted) >= '" & datainizio & "' AND TRIM(date_inserted) <= '" & datafine & "'"

oRs.open strSQL,oConn,3
schede = oRs.RecordCount

Do until oRs.EOF
sch_sin = cint(sch_sin) + cint(oRs("SCHE_SINGOLA").Value)
oRs.movenext
Loop

Then inside my asp page in the body i write the result. and this works

<%
Response.write schede
%>

Then i want to get the SUM of the values inserted in the SCHE_SINGOLA column (defined as text)

<%
Response.Write sch_sin
%>

But here i get a type mismacth error..
What should i do?

Thanks

Shavonne Wijesinghe
www.studioform.it

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Martin Marques 2007-03-20 11:55:36 Re: Select and Count
Previous Message Richard Huxton 2007-03-20 09:27:42 Re: ERROR: duplicate key violates unique constraint