Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL query
Message
From
15/02/2019 10:49:43
 
 
To
15/02/2019 08:14:46
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01666437
Message ID:
01666451
Views:
52
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform