Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with MAX() in SELECT
Message
De
24/01/2002 16:36:56
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrats & ententes
Divers
Thread ID:
00608962
Message ID:
00610122
Vues:
30
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]
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform