Select and Count - Mailing list pgsql-sql

From Shavonne Marietta Wijesinghe
Subject Select and Count
Date
Msg-id 005701c76ad8$8c4c7690$1102a8c0@dream
Whole thread Raw
Responses Re: Select and Count  (Martin Marques <martin@bugs.unl.edu.ar>)
List 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
 

pgsql-sql by date:

Previous
From: Richard Huxton
Date:
Subject: Re: ERROR: duplicate key violates unique constraint
Next
From: Martin Marques
Date:
Subject: Re: Select and Count