Hi Maurice, I suspect that using EVALUATE you cannot refererence fields and values from inside the query, you can only reference fields and values from the VFP environment before running the query.
Gianni On Tue, 28 Oct 2014 21:36:36 +0100, Jean MAURICE <[email protected]> wrote: a little more : writing the table name instead of local alias avoid the syntax error but the result is wrong. 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, ; CAST(EVALUATE("MIN(cantine_services.capacite, cantine_salles.capacite, tarifs_cantine.capacite)") AS Integer) AS disponible ; FROM cantine_services sv ; INNER JOIN cantine_salles sal ON sv.salle = sal.clef, ; tarifs_cantine ta ; WHERE ta.anscol = lcannee INTO CURSOR dispo READWRITE 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/[email protected] ** 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.

