On Wed, Oct 29, 2014 at 7:25 AM, Laurie Alvey <[email protected]> wrote:
> 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. > ------------------ Why not Union the Min Query for as many tables as necessary into independent rows in a temp table / cursor and then min that single column ? -- Stephen Russell Sr. Analyst Ring Container Technology Oakland TN 901.246-0159 cell --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- _______________________________________________ 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/CAJidMYJqsvZmsNM0-g_02i0WjkuwzkCN=539xg0z4upfrvd...@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.

