ShyFox,
Could we just cut and paste from sql window into a foxpro method and vice-versa?
Unfortunately, it is not that simple.
It's true that the VFP implementation of SQL is now closer to that of SQL Server. They both now conform to the ANSI 92 standard. So the basic syntax is the same.
However, if the query contains anything other than basic field names, operators and literals, they might well be incompatible. This is especially true where functions are involved. For example, to find all overdue payments in VFP, you would do this:
SELECT * FROM PAYMENTS WHERE Due_Date < DATE()
but in SQL Server, it would be:
SELECT * FROM PAYMENTS WHERE Due_Date < GETDATE()
There a hundreds (literally) of functions in VFP that do not exist or have different syntax in SQL Server.
There are also different data types, different treatment of memo/text fields, and differences caused by empty dates. Also, string delimiters are different: SQL Server requires single quotes, not double quotes or square brackets.
So, for very simple queries, you can indeed cut and paste as you suggested. But don't count on being able to do that all the time.
Mike
Mike Lewis
Edinburgh, Scotland