Gustav Brock
Gustav at cactus.dk
Thu Feb 24 11:20:17 CST 2005
Hi Charlotte et all
Really? I thought these functions were quite slow.
Anyway, here's a method to add only positives in a query.
Using IIf() it would be:
SELECT
IIF(F1>0,F1,0)+IIF(F2>0,F2,0)+..+IIF(Fn>0,Fn,0) AS SumPositives
This can be replaced with native SQL code:
SELECT
(ABS(F1)+F1+ABS(F2)+F2+..ABS(Fn)+Fn)/2 AS SumPositives
/gustav
>>> cfoust at infostatsystems.com 24-02-2005 17:18:28 >>>
Choose() and Switch() are both faster than Iif.
Charlotte Foust
-----Original Message-----
From: Sad Der [mailto:accessd666 at yahoo.com]
Sent: Thursday, February 24, 2005 1:07 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Query tuning in Access?
Erwin,
thnx for you're response. it is a very detailled list!
One question:
I know IFF() is very slow. But what can I do to
replace them?