Stephen Adels
United States of America
No favorite files added yet
(Jan 5, 2005 - 9:57 AM)
SQL has always been around in FoxPro since at least 2.6 for DOS. It has always been fairly non-compliant with the ANSI standards. Fox 9 greatly improves FoxPros SQL ANSI compliance and makes it much more similar to Microsoft SQL Server's SQL. This is great news, because FoxPros greatest strength is its local data processing, and now Microsoft SQL programmers can take advantage of the new Fox SQL without a learning curve on the SQL itself. Also, many of the arbitrary limits have been removed, like the 24 item limit to the IN clause list.
(select * where pk in (1,2,3,4,...,25) would err and is now fixed.)
Here is a list of SQL enhancements taken from the Fox 9 Beta documentation:
In VFP9, there is no hard coded limit for amount of joins or amount of subqueries used in a SQL statement.
There is no hard coded limit for amount of UNIONs in a SQL SELECT statement in VFP9.
There is no hard coded limit for amount of tables referenced by a SQL statement in VFP9.
For VFP9, we will remove the hardcoded limit of 24 arguments that are allowed in a SQL IN statement.
VFP9 will allow for multiple subquery nesting. Correlation is allowed to the immediate parent. There is no hard coded limit for nesting depth.
We will allow for UNION clause in a SQL INSERT statement FROM clause.
SQL - Allow GROUP BY in Correlated Subquery
SQL - Allow ORDER BY in Conjunction with TOP N Inside of Non-Correlated Subquery
SQL - Allow Sub-SELECT in FROM Clause
SQL - Allow Subquery in SELECT List (Projection)
VFP9 will allow subquery as a column or a part of expression in projection.
SQL – Allow ORDER BY Using Field Name with UNION Clause
In VFP8, as soon as one uses the UNION clause, you need to use numeric references
and can no longer use the field name for the ORDER BY clause.
In VFP9, we will remove this restriction such as in following example:
SQL – Allow Subquery in UPDATE SET List - VFP9 will allow for a subquery in UPDATE SET clause.
SQL – Support for Correlated UPDATE
SQL – Support for Correlated DELETE
SQL – Optimize LIKE "sometext%" Performance
SQL – Optimize TOP N Performance
SQL – New Support for Local Buffered Data
SET SQLBUFFERING ON | OFF - If data is not buffered, we simply grab from disk.
SQL – Allow Aggregate Functions in SELECT List of a Subquery Compared Using {< | | >=} {ALL | ANY | SOME}
SET ENGINEBEHAVIOR 70 ! 80 ! 90 - We will update the SET ENGINEBEHAVIOR command to change the SQL behavior
SET ENGINEBEHAVIOR 90 - Specifies that VFP treats SQL commands with the standard VFP 9.0 behavior.