Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with SQL Syntax
Message
De
08/03/2002 10:15:20
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00630077
Message ID:
00630187
Vues:
19
I did spot that, minutes after posting it.

Thanks
Kev
>You should take in account re_date also.
>
SELECT Cl_Ref, re_date, MIN(R.Re_Time) ;
>  FROM Referral R;
> WHERE BETWEEN(DTOS(R.Re_Date), "20010101", "20010201");
> GROUP BY Cl_Ref, Re_Date
>  INTO CURSOR Minimums NOFILTER
>
>SELECT *;
>  FROM Referral;
> WHERE BETWEEN(DTOS(Re_Date), "20010101", "20010201");
>   AND DTOS(re_date) + Re_Time = (SELECT DTOS(re_date) + min_re_time ;
>   		    FROM Minimums;
>   		   WHERE Minimums.Cl_Ref = Referral.Cl_Ref) ORDER BY Cl_Ref
>
>
>>Here is the only other way (with minimum) effor that I can think to do it:
>>
>>
SELECT Cl_Ref, MIN(R.Re_Time) ;
>>  FROM Referral R;
>> WHERE BETWEEN(DTOS(R.Re_Date), "20010101", "20010201");
>> GROUP BY Cl_Ref, Re_Date
>>  INTO CURSOR Minimums NOFILTER
>>
>>SELECT *;
>>  FROM Referral;
>> WHERE BETWEEN(DTOS(Re_Date), "20010101", "20010201");
>>   AND Re_Time = (SELECT min_re_time ;
>>   		    FROM Minimums;
>>   		   WHERE Minimums.Cl_Ref = Referral.Cl_Ref) ORDER BY Cl_Ref
>>
>>
>>
>>If anyone can think of another way, please let me know.
>>
>>Thanks
>>Kev
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform