Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with MAX() in SELECT
Message
From
24/01/2002 16:36:56
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
General information
Forum:
Visual FoxPro
Category:
Contracts, agreements and general business
Miscellaneous
Thread ID:
00608962
Message ID:
00610122
Views:
19
Hi Sergey;
thanks, your solution work.

I translate it (for all intersted in) according to may sample from message.
SELECT;
 Test1.c1, Test2.c2 AS max_code;
 FROM Test1 ;
 LEFT OUTER JOIN Test2 ;
 ON Test1.c1=ALLTRIM(Test2.c2);
 OR 'X'=ALLTRIM(Test2.c2)
But now I'm in trouble to understand why. Also I do
SELECT;
 Test1.c1, Test2.c2 AS max_code,;
 Test1.c1=ALLTRIM(Test2.c2),'X'=ALLTRIM(Test2.c2);
 FROM Test1 ;
 LEFT OUTER JOIN Test2 ;
 ON Test1.c1=ALLTRIM(Test2.c2);
 OR 'X'=ALLTRIM(Test2.c2)
As supposed 'X'=ALLTRIM(Test2.c2) is always .F. except for "grau" and "will".

Following that I try
SELECT;
 Test1.c1, Test2.c2 AS max_code,;
 Test1.c1=ALLTRIM(Test2.c2),'X'=ALLTRIM(Test2.c2);
 FROM Test1 ;
 LEFT OUTER JOIN Test2 ;
 ON Test1.c1=ALLTRIM(Test2.c2)
* ;
* OR 'X'=ALLTRIM(Test2.c2)
- all from Tests is .NULL. again.
The OR 'X'=ALLTRIM(Test2.c2) changes something in the join, but why?

A play a bit around OR LEN(Test2.c2)=-1 is as fine as OR 'X'=ALLTRIM(Test2.c2).
Thats weird.

I wish everybody a nice rest of the day - a have an encounter with my cushion now.
See you tomorrow.

Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Reply
Map
View

Click here to load this message in the networking platform