Of course it is possible.  Try
SELECT D_ID, D_Name, D_Loss/D_Goal*100 as MyValue
FROM diet

Then put a % after the output value. e.g. <cfoutput>#MyValue#</cfoutput>%

----- Original Message -----
From: "Ann Harrell" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Sunday, February 17, 2002 8:41 PM
Subject: Calculations in Query?


> I'm trying to figure a percentage in a query. I don't know if it's
possible.
> I would like to D_Loss / D_Goal and then output the percentage. I'm using
an
> Access database if that helps.
>
> <CFQUERY NAME="QDiet" DATASOURCE="met">
> SELECT D_ID, D_Name, D_Loss, D_Goal
> FROM diet
> ORDER BY  diet.D_Name
> </CFQUERY>
>
> Thanks!
>
> Ann Harrell
> 
______________________________________________________________________
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to