Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Select Conundrum
Message
 
 
À
27/07/2006 10:11:10
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
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01140649
Message ID:
01140679
Vues:
18
If you get an error than move ORDER clause after WHERE. The T-SQL is particular about the clauses order.

>Any idea why everything works fine until I add the WHERE clause?
>
>
>lcfilter = 'ABC123'
>SQLEXEC(lnConnhandle," select t22.field3, t23.field3, t1.field1, t1.field4 from table1 t1 ;
>   JOIN table2 t22 ON t22.field1 = 'FKEY1' and t22.field2 = t1.field2 ;
>   JOIN table2 t23 ON t23.field1 = 'FKEY2' and t23.field2 = t1.field3 ;
>   ORDER BY 3, 4 ;
>   WHERE t1.field1 = ?lcfilter",'sqlresults')
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform