Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL query
Message
De
15/02/2019 10:49:43
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01666437
Message ID:
01666451
Vues:
53
>Hi friends,
>I am looking for a clever SQL query to find the max difference between two consecutive values in a VFP table (see attached dbf)
>
>Best regards

Eugen,

This
SELECT TOP 1 ABS(D1.Bore - D2.Bore) AS BoreDifference, D1.Depth, D2.Depth ;
	FROM csvData D1 ;
		INNER JOIN csvData D2 ON D2.Depth = D1.Depth + 0.050 ;
	ORDER BY 1 DESC
will return 0.952 as the max difference that occurred between the depths 3.7 and 3.75.
----------------------------------
António Tavares Lopes
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform