Roz Clarke
roz.clarke at donnslaw.co.uk
Thu Nov 6 05:32:28 CST 2003
What error does it give you Pedro? I would normally use a nested Iif statement rather than a list of separate statements, e.g. SELECT iif([Code]='501',[Telling]*1,iif([Code]='503',[Telling]*2,iif([Code]='507',[ Telling]*2,iif([Code]='506',[Telling]*0,67,iif([Code]='502',[Telling]*0,4,ii f([Code]='522',[Telling]*0,4,iif([Code]='542',[Telling]*0,2,iif([Code]='500' ,[Telling]*0)))))))) AS Resultaat_Telling FROM TellingCode; ...but I don't know if that's the only way to do it. -----Original Message----- From: pedro at plex.nl [mailto:pedro at plex.nl] Sent: 06 November 2003 12:25 To: AccessD at databaseadvisors.com Subject: [AccessD] why isn't this working? Hello Group, i can't seem to let this query work. Why? Pedro Janssen SELECT iif([Code]='501',[Telling]*1),iif([Code]='503',[Telling]*2),iif([Code]='507' ,[Telling]*2),iif([Code]='506',[Telling]*0,67),iif([Code]='502',[Telling]*0, 4),iif([Code]='522',[Telling]*0,4),iif([Code]='542',[Telling]*0,2),iif([Code ]='500',[Telling]*0) AS Resultaat_Telling FROM TellingCode; _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com