Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Syntax Error
Message
 
 
À
12/08/2012 09:27:16
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:
01550370
Vues:
79
Thank you for the clarification. That kind of detail should be implanted in my permanent memory and clearly is not.

Not to make excuses but IMO white space is important for readability and maintainability even if the compiler doesn't care. (Making excuses ;-) ).

I still wonder whether the lcString* value clauses in the actual command here include embracing parens.

>>One is VFP may be interpreting them as function calls due to the lack of spaces before the open parentheses.
>
>Don't think so, Mike
>
>A space is a separator and is discarded
>An opening parenthesis is a separator but is not discarded
>
>Concerning the IN clause, you can have zero to any number of white space chars. Same for function call
>
>  where field in(1,2,3)
>
>
>is same as
> where field in                     (1,2,3)
>
>These are also the same
>
>	= MyFunc()
>	= MyFunc						()
>
>
>Non-significant white space is discarded http://en.wikipedia.org/wiki/Lexer_(computer_science)
>
>
>>My suspicion as well. Saifuddin, the next thing you should do is set a breakpoint on the SELECT statement and check the values of lcString and lcString1/2/3. Also do as suggested by Tore and create a variable called lcQuery and check its LEN().
>>
>>The syntax of the IN clauses also makes me a little nervous, for two reasons. One is VFP may be interpreting them as function calls due to the lack of spaces before the open parentheses. Also, the terms of an IN clause in VFP are supposed to be enclosed in parentheses, e.g. IN ('A', 'B', 'C').
>>
>>Good luck!
>>
>>>I'd check what is in your lcString* first.
>>>
>>>>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
>>>>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform