The only way I've found to do this is to use an external function, like
this:

CLOSE DATABASES ALL
*!* Source tables have 100 rows of random integers
USE colmin1.dbf
USE colmin2.dbf IN 0
USE colmin3.dbf IN 0
USE colmin4.dbf IN 0

CREATE CURSOR cout (f1 I, f2 I, f3 I, f4 I, minv I)

INSERT INTO cout ;
SELECT c1.f1, c2.f2, c3.f3, c4.f4, ;
MinCol(c1.f1, c2.f2, c3.f3, c4.f4) As minv FROM colmin1 c1 ;
JOIN colmin2 c2 ON c1.pk = c2.pk ;
JOIN colmin3 c3 ON c1.pk = c3.pk ;
JOIN colmin4 c4 ON c1.pk = c4.pk

FUNCTION MinCol(n1, n2, n3, n4) As Integer
RETURN CAST(MIN(n1,n2,n3,n4) As I)
ENDFUNC

I'd be interested to see another way of doing this.

Laurie

On 29 October 2014 10:39, Jean MAURICE <[email protected]> wrote:

> Hi Bill : unknown alias ta !
>
> The Foxil
>
> Le 28/10/2014 22:08, Bill Anderson a écrit :
>
>> Jean,
>>
>> That should fail. The column names would not be available to be used in
>> the
>> SELECT portion of the clause. If you use the HAVING clause as part of the
>> join, the column names are available to be used.
>>
>> Replace the Disponible field with this and see if it works:
>>
>> CAST(EVALUATE("MIN(sal.capacite, sv.capacite, ta.capacite, ta.maxjour)")
>> AS
>> Integer) AS disponible
>>
>> Bill Anderson
>>
>>
[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/camvtr9dedy6rtfwvmbxde7ogbmkm2otmckw_x6jj1_are4u...@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.

Reply via email to