[AccessD] Where claise in IIf query

Jim Dettman jimdettman at earthlink.net
Mon Nov 10 14:17:18 CST 2003


Sorry, read the question without looking at the SQL.  The SQL you have looks
fine.  What's the problem your having?

Jim Dettman
President,
Online Computer Services of WNY, Inc.
(315) 699-3443
jimdettman at earthlink.net

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Jim Dettman
Sent: Monday, November 10, 2003 2:22 PM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Where claise in IIf query



  Define the IIF() expression as a column (field), then place criteria on
that.

Jim Dettman
President,
Online Computer Services of WNY, Inc.
(315) 699-3443
jimdettman at earthlink.net

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of
Oleg_123 at xuppa.com
Sent: Monday, November 10, 2003 1:43 PM
To: accessd at databaseadvisors.com
Subject: [AccessD] Where claise in IIf query


Hey Group, I am not able to put conditions in queries whee I use IIF. What
is the alternate solution ?
This works ---

SELECT Table3.amount,
IIf([Amount]="4 ","777",IIf([Amount]="2 ","060010",IIf([Amount="3
","055"))) AS HH,
IIf([HH]="060010 ","zzz",IIf([HH]="777 ","yyy")) AS JJ
FROM Table3;

however when  Iput in WHERE

SELECT Table3.amount,
IIf([Amount]="4 ","777",IIf([Amount]="2 ","060010",IIf([Amount="3
","055"))) AS HH,
IIf([HH]="060010 ","zzz",IIf([HH]="777 ","yyy")) AS JJ
FROM Table3
WHERE JJ = "zzz"

doesn't work. I tried inserting GROUP BY by all statements, and then
HAVING, but doesn't work either...


-----------------------------------------
Get Breaking News from CNN, ABC, NBC, CBS Now.
http://www.xuppa.com/news/?link=webmail


_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


_______________________________________________
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