You don't have to make as many comparisons as Paul suggested, make 3
comparisons, then 2 then 1:
SELECT DISTINCT ta.codtarif AS tarif, ;
sv.clef AS clefserv, sv.salle, sv.capacite AS servdispo, sv.libelle AS
service, ;
sal.capacite AS salledispo, sal.libelle AS nomsalle, ;
ta.capacite AS maxtarif, ta.maxjour AS maxjour, ta.libelle AS
libeltarif, ;
icase(sv.capacite < sal.cpacite and sv.capacite < ta.capacite and
sv.capacite < ta.maxjour, sv.capacite, ;
sal.capacite < ta.capacite and sal.capacite < ta.maxjour,
sal.capacite, ;
ta.capacite < ta.maxjour, ta.capacite, ta.maxjour) AS
disponible ;
FROM cantine_services sv ;
INNER JOIN cantine_salles sal ON sv.salle = sal.clef, ;
tarifs_cantine ta ;
WHERE ta.anscol = "W" INTO CURSOR dispo READWRITE
On 29 October 2014 14:16, Jean MAURICE <[email protected]> wrote:
> today, the simplest way to solve the issueis the ICASEgiven by Paul Hill.
>
> The Foxil
>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/CAJeZx3=ua=wzzrg+p457k5fz-kx8pvntkaccoqtrk+ceh5r...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.