Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Foxpro SQL vs. SQL Server syntax differences?
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01415825
Message ID:
01415881
Vues:
71
>>I'm preparing to do an app conversion where I will convert from DBF to SQL Server and begin using SqlExec(). I have lots of SQL strings in my app already that run fine against local DBF tables, so I'm wanting to see if there is a list somewhere or if you can give me advice on what syntax and stuff that works fine on DBF, but that will need to be modified to run on SQL server. This way I can scan my SQL strings and look for areas that I need to change.
>
>- There's totally different set of built-in functions in VFP and SQL Server. See http://fox.wikis.com/wc.dll?Wiki~VFPSQL-TSQL-Mapping
>- Look for WHERE conditions that combine multiple fields into one expression. SQL Server does not support such indexes and such query will not be optimizable.
>- SQL Server does not support a filed alias in the ORDER BY or GROUP BY clauses

Sergey,

This is not correct. SQL Server supports field alias in ORDER BY clause.
select top 5 ID, Searched as Search from TestTable Order by Search
It doesn't support it in all other places EXCEPT Order BY.

>- SQL Server doesn't have a logical data type. The closest one is a BIT but it's numeric. a condition 'WHERE SomeField' has to be changed to 'WHERE SomeField=1'.
>- The SQL server string comparison matches VFP with SET ANSI ON or when '==' operator is used. See http://www.berezniker.com/content/pages/visual-foxpro/string-comparison-vfp for details. Otherwise you may have to revise them.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform