The below part is invalid syntax for a Case statement and in a Select
(CASE when idno <= 5 then value * 6 else value * 4 END) charge
If you are manipulating "value" just do the math after the select
select idno , value from records
If idno <= 5 Then
charge = value * 6
Else
charge = value * 4
End If
Re: Adding values of ASP fields generated by different SQL statementsIn
effect the SQL statements will display two calculated values
from a database using a SUM statement or COUNT statement. I want to
manipulate the numbers to produce additional information. I've
tried using a CASE statement in the SQL command but this is failing at the
moment, example below. What I want to know is it
possible to have a number generated by ASP then manipulated via HTML and
what format name should be used to access the ASP values?
select idno , value , (CASE when idno <= 5 then value * 6
else value * 4 END) charge
from records
Regards
Ian
What calculations?
Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
-----Original Message-----
From: Ian [mailto:
[email protected]]
Posted At: 29. marts 2005 20:38
Posted To: microsoft.public.frontpage.programming
Conversation: Adding values of ASP fields generated by
different SQL statements
Subject: Adding values of ASP fields generated by different
SQL statements
I have two fields on a WEB page which are generated by two
different SQL statements. I want to do some calculations
using the values returned outside of the ASP code. Can
anybody tell me the format of the commands I will have to use
in HTML at achieve this? And are there any gottas?
Thanks
Ian