Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Syntax Error
Message
De
12/08/2012 07:45:57
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
12/08/2012 04:34:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01550355
Message ID:
01550361
Vues:
67
In the past, I did long queries that combined 9 or 10 tables (I believe 10 tables is the maximum), but then found that joining two at a time is much faster in Visual FoxPro. This should also make the resulting code easier to debug. (On the downside, the result will include the join fields, whether you need them or not - unless you list all the fields you want in subsequent querries.)

>Hi,
>
>I am facing a syntax error in the following SQL-Select, but I could not find it please guide..
>
>SELECT Simain.sino, Simain.invdate, Simain.pcode, Simain.location,;
>  Simain.cashname, Simain.salesman, Simain.merchand, Sisub.icode,;
>  Sisub.qntymaj, Sisub.qntymin, Sisub.ratemaj, Sisub.ratemin, Saleprog.zone,;
>  Kategory.maincat, Kategory.category, Kategory.subcat1, Kategory.subcat2,;
>  Icode.barcode, Icode.full_desc, Customer.full_name;
> FROM ;
>     vfas!simain ;
>    INNER JOIN vfas!sisub ;
>   ON  Simain.sino = Sisub.sino ;
>    INNER JOIN vfas!saleprog ;
>   ON  Simain.salesman = Saleprog.salesman ;
>    INNER JOIN vfas!kategory ;
>   ON  Sisub.icode = Kategory.icode ;
>    INNER JOIN vfas!icode ;
>   ON  Sisub.icode = Icode.icode ;
>    INNER JOIN vfas!customer ;
>   ON  Simain.pcode = Customer.pcode ;
>   WHERE tKategory.mainCat IN(&lcString) AND ;
>                           tKategory.category IN(&lcString1) AND ;
>                            tKategory.subCat1 IN(&lcString2) AND ;
>                            tKategory.subCat2 IN(&lcString3) INTO CURSOR Salqry1 READWRITE
>
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform