|
 |
access_asp thread: Nevermind.. Getting SUM() value from SQL function
Message #1 by "Young, Ashley" <Ashley.Young@c...> on Fri, 23 Aug 2002 16:10:52 -0400
|
|
Nevermind...the lightbulb came on. ;)
--Ashley
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Friday, August 23, 2002 2:42 PM
To: Access ASP
Subject: [access_asp] Getting SUM() value from SQL function
I'm sure there is a very simple answer to this question, but I can't figure
out what to do.
I want to write an SQL statement like this:
sSQL = "Select SUM(MeritExempt2000) from survey_information where NOT
MeritExempt2000=''",connection,3
connection.execute(sSQL)
How in the world do I get the actual value the SQL statement returns into
the ASP page?
Any help is greatly appreciated.
--Ashley
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
Message #2 by Karri Peterson <KPeterson@C...> on Fri, 23 Aug 2002 15:18:58 -0500
|
|
What was the fix, Ashley?
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Friday, August 23, 2002 3:11 PM
To: Access ASP
Subject: [access_asp] Nevermind.. Getting SUM() value from SQL function
Nevermind...the lightbulb came on. ;)
--Ashley
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Friday, August 23, 2002 2:42 PM
To: Access ASP
Subject: [access_asp] Getting SUM() value from SQL function
I'm sure there is a very simple answer to this question, but I can't figure
out what to do.
I want to write an SQL statement like this:
sSQL = "Select SUM(MeritExempt2000) from survey_information where NOT
MeritExempt2000=''",connection,3
connection.execute(sSQL)
How in the world do I get the actual value the SQL statement returns into
the ASP page?
Any help is greatly appreciated.
--Ashley
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
Message #3 by "Young, Ashley" <Ashley.Young@c...> on Fri, 23 Aug 2002 16:19:37 -0400
|
|
I used an alias:
set rs_rs = server.createobject("adodb.recordset")
rs_rs.open "select sum(field_name) as aliasname from tablename"
To access the value:
response.write("Sum Value: " &rs_rs("aliasname"))
--Ashley ;)
-----Original Message-----
From: Karri Peterson [mailto:KPeterson@C...]
Sent: Friday, August 23, 2002 3:19 PM
To: Access ASP
Subject: [access_asp] RE: Nevermind.. Getting SUM() value from SQL
functio n
What was the fix, Ashley?
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Friday, August 23, 2002 3:11 PM
To: Access ASP
Subject: [access_asp] Nevermind.. Getting SUM() value from SQL function
Nevermind...the lightbulb came on. ;)
--Ashley
-----Original Message-----
From: Young, Ashley [mailto:Ashley.Young@c...]
Sent: Friday, August 23, 2002 2:42 PM
To: Access ASP
Subject: [access_asp] Getting SUM() value from SQL function
I'm sure there is a very simple answer to this question, but I can't figure
out what to do.
I want to write an SQL statement like this:
sSQL = "Select SUM(MeritExempt2000) from survey_information where NOT
MeritExempt2000=''",connection,3
connection.execute(sSQL)
How in the world do I get the actual value the SQL statement returns into
the ASP page?
Any help is greatly appreciated.
--Ashley
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
|
|
 |