[AccessD] Oleg - Where Clause in IIF query (Solved)

paul.hartland at fsmail.net paul.hartland at fsmail.net
Tue Nov 11 03:37:01 CST 2003


Oleg,
 
Have you solved this yet, if not try the code below (you need a double select statement to get it to work how you want)
 
SELECT * 
FROM 
(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";
 
Because the first query (in brackets) need to run/resolve before you can ask for a value from the alias column HH
 
Paul Hartland
Database Designer/Developer


More information about the AccessD mailing list