RE: Select statement with a max() of 2 values

2007-06-21 Thread Tristan Leask
Hi Bill, That's the way I did it in the end. Cheers Tristan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bill Anderson Posted At: 20 June 2007 18:38 Posted To: Profox Archive Conversation: Select statement with a max() of 2 values Subjec

Re: Select statement with a max() of 2 values

2007-06-20 Thread Pete Theisen
On Wednesday 20 June 2007 20:22, Stephen the Cook wrote: > Bill Anderson <> wrote: > > Ted Roche wrote: > > Search my name and MAX in the archives and see what comes up... > > Bush, Cheney, Jews. Hi Stephen! You either forgot the [OT] or the "Bad Steve". Bad Pete -- Regards, Pete http://www.p

RE: Select statement with a max() of 2 values

2007-06-20 Thread Stephen the Cook
Bill Anderson <> wrote: > Ted Roche wrote: >> On 6/20/07, Tristan Leask <[EMAIL PROTECTED]> wrote: >> >>> SELECT f1, f2, max(f5,f6) as test FROM t1.. >>> >>> This looks ok to me, however when I try to run it, foxpro doesn't >>> like the fact that I am using the MAX() function. >>> >> >> MAX

Re: Select statement with a max() of 2 values

2007-06-20 Thread Bill Anderson
Bill Anderson wrote: > Ted Roche wrote: > >> On 6/20/07, Tristan Leask <[EMAIL PROTECTED]> wrote: >> >> >>> SELECT f1, f2, max(f5,f6) as test FROM t1.. >>> >>> This looks ok to me, however when I try to run it, foxpro doesn't like >>> the fact that I am using the MAX() function. >>>

Re: Select statement with a max() of 2 values

2007-06-20 Thread Bill Anderson
Ted Roche wrote: > On 6/20/07, Tristan Leask <[EMAIL PROTECTED]> wrote: > >> SELECT f1, f2, max(f5,f6) as test FROM t1.. >> >> This looks ok to me, however when I try to run it, foxpro doesn't like >> the fact that I am using the MAX() function. >> > > MAX() is one of the few times ther

RE: Select statement with a max() of 2 values

2007-06-20 Thread Tristan Leask
Ah, that makes sense. Thanks Ted. Tristan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ted Roche Posted At: 20 June 2007 14:43 Posted To: Profox Archive Conversation: Select statement with a max() of 2 values Subject: Re: Select statement with a max

Re: Select statement with a max() of 2 values

2007-06-20 Thread Gianni Turri
Using evaluate() may impact less on performance. SELECT f1, f2, evaluate("max(f5,f6)") as test FROM t1.. Gianni - Original Message - From: Ed Leafe <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Sent: Wed, 20 Jun 2007 09:26:20 -0400 Subject: Re: Select statement w

Re: Select statement with a max() of 2 values

2007-06-20 Thread Ted Roche
On 6/20/07, Tristan Leask <[EMAIL PROTECTED]> wrote: > > SELECT f1, f2, max(f5,f6) as test FROM t1.. > > This looks ok to me, however when I try to run it, foxpro doesn't like > the fact that I am using the MAX() function. MAX() is one of the few times there's a name collision between a native

Re: Select statement with a max() of 2 values

2007-06-20 Thread Peter Cushing
Tristan Leask wrote: > Afternoon all, > > I have got a strange one here. I have written a SELECT statement which > is something similar to > > SELECT f1, f2, max(f5,f6) as test FROM t1.. > > This looks ok to me, however when I try to run it, foxpro doesn't like > the fact that I am using t

RE: Select statement with a max() of 2 values

2007-06-20 Thread Tristan Leask
statement with a max() of 2 values Subject: Re: Select statement with a max() of 2 values Why not create a little UDF, and use that in the SQL? FUNCTION FoxMax(p1, p2) RETURN MAX(p1, p2) SELECT f1, f2, FoxMax(f5,f6) as test FROM t1.. -- Ed Leafe -- http://leafe.com -- http

Re: Select statement with a max() of 2 values

2007-06-20 Thread Ed Leafe
On Jun 20, 2007, at 9:20 AM, Tristan Leask wrote: > I have got a strange one here. I have written a SELECT statement > which > is something similar to > > SELECT f1, f2, max(f5,f6) as test FROM t1.. > > This looks ok to me, however when I try to run it, foxpro doesn't like > the fact th

Select statement with a max() of 2 values

2007-06-20 Thread Tristan Leask
Afternoon all, I have got a strange one here. I have written a SELECT statement which is something similar to SELECT f1, f2, max(f5,f6) as test FROM t1.. This looks ok to me, however when I try to run it, foxpro doesn't like the fact that I am using the MAX() function. Apparently when