> > And since 0 is false and every other number is true,
> > this could be
> > simplified to
> >
> > SELECT country
> > FROM Rates
> > WHERE fieldvalue1 AND fieldvalue2 AND fieldvalue3
> > ORDER BY country;
> >
> > Michael
> >
> >
>
> I will go to bed less fool this evening... Is it just
> a clearest way to write it, or is there some
> performance issues too ?
Actually -- this isn't "clear" at all. It's the shortest
way, not the clearest.
It's most probably not portable too.
One might think that "fieldvalue1" is a boolean
column instead of a numeric one.
Personally, I would advise against such a query
it were to be coded for re-use or use in an application.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com