[AccessD] IIf in query discussion

John Bartow john at winhaven.net
Mon Mar 31 16:33:39 CST 2003


SQL can usually handle the things I work on so typically good SQL works in a
normalized DB. Other wise I would create a function with a if-then or select
case. I can't remember using a parameter to replace an IIF buts whatever
fits the bill. In the long run its something you have to decide on. It
really depends on the situation and a lot of what people do is just personal
preference. If it works for you its OK by me! BTW, I responded quickly and I
didn't notice the "rookie" part. That's kind of harsh. I guess I'll aways be
a rookie :o) I just meant that IIFs are cludgy to read and slow to operate
(which of course doesn't really matters a lot with today's PCs).

JB

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Michael R
Mattys
Sent: Monday, March 31, 2003 2:08 PM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] IIf in query discussion


I may learn something new here.

What are the alternatives?
Functions with paramarray variables?
More precise SQL statements?
Else?

Michael R. Mattys
www.mattysconsulting.com

----- Original Message -----
From: "John Bartow" <john at winhaven.net>
To: <accessd at databaseadvisors.com>
Sent: Monday, March 31, 2003 3:14 PM
Subject: RE: [AccessD] IIf in query discussion


> MessageYou probably need to give us more details but I tend to agree in
> philosophy with the idea that IIF should not be used unless necessary. But
> in practice it is sometimes necessary. I have it used it mostly when
> querying a pre-existing database which is poorly normalized (hmmm, that
> might be an oxy-moron). I use it as a guideline not a rule though, the
only
> "rule" I tend to have is to never rule out anything.
>
> I think the biggest drawback beyond speed is that its Access specific and
> they can be difficult to read. I think "spreadsheet people" love it
though.
>
> JB
>
>  -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com]
> Sent: Monday, March 31, 2003 1:39 PM
> To: accessd at databaseadvisors.com
> Subject: [AccessD] IIf in query discussion
>
>
>   Recently I read an article by an Access expert who suggested that using
> 'iif' in a query is a rookie mistake.
>
>   I've made that mistake.
>
>   My question: Does using 'iif' in a query just slow done processing, or,
> does it have more substantial consequences?
>
>   TIA,
>   Myke
>
>


----------------------------------------------------------------------------
----


> _______________________________________________
> 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