Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Evaluate and Macro
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00956257
Message ID:
00956259
Views:
10
This message has been marked as the solution to the initial question of the thread.
>Hi all?
>
>When i try this code i haven't error.
>
>
>dvd = DATE()
> ccondit = ' ?dvd BETWEEN E.Ddebut AND E.Dfin '
>
>  SELECT   Teleph.cnomteleph AS 'cnom' ,  e.ddebut   ;
>    FROM ( (  amline!Resident AS 'R' ;
>    INNER JOIN amline!Teleph Teleph ON  R.itelephoneid = Teleph.iid ) ;
>    LEFT OUTER JOIN amline!Etats AS 'E' ON R.iid = e.iresidentid );
>    WHERE &ccondit  ORDER BY 1 INTO CURSOR Temp
>
>
>When i try this Code i have a syntax error !
>
>dvd = DATE()
> ccondit = ' ?dvd BETWEEN E.Ddebut AND E.Dfin '
>
>  SELECT   Teleph.cnomteleph AS 'cnom' ,  e.ddebut   ;
>    FROM ( (  amline!Resident AS 'R' ;
>    INNER JOIN amline!Teleph Teleph ON  R.itelephoneid = Teleph.iid ) ;
>    LEFT OUTER JOIN amline!Etats AS 'E' ON R.iid = e.iresidentid );
>    WHERE EVAL( ccondit )  ORDER BY 1 INTO CURSOR Temp
>
>
>
>Why ?
>I want to use the command 'evaluate' because it appears that faster ?

Bernhart,

In case when you replace a part of VFP command you can use macro substitution only. The EVAL() function can evaluate expressions only and ' ?dvd BETWEEN E.Ddebut AND E.Dfin ' isn't valid expression.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform