[AccessD] multiplications in one query

Bobby Heid bheid at appdevgrp.com
Thu Oct 30 07:21:25 CST 2003


OTOMH,

SELECT
Code,Result_Telling:iif([Code]='A',[Telling]*0.3,iif([Code]='B',[Telling]*2,
[Telling]*7))
    FROM sometable;


Bobby

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of pedro at plex.nl
Sent: Thursday, October 30, 2003 1:47 PM
To: AccessD at databaseadvisors.com
Subject: [AccessD] multiplications in one query


Hello Group,

i have a query with two fields: code and telling.
I would like to do some calculations with these fields. 
The calculations could be done in a query for each code, 
but i want to do all calculations in one query?


TIA

Pedro Janssen
Cytologist


i have.

code            telling
a                 1000
b                  500
c                  100


i want to multiply
a (1200)*0,3
b (500)*2
c (100)*7


as result i would like

code           Result_Telling
a                  300
b                 1000
c                  700
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list