Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Condition in code text endtext
Message
From
12/06/2005 06:36:58
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01022574
Message ID:
01022575
Views:
14
>Hi all,
>
>How can i place a condition in code text endtext ?
>
>
> nOrdre = 1
>
>  TEXT TO lcSql NOSHOW TEXTMERGE
>  SELECT  LEFT( T.cnomteleph , 20 )  + ' - F.' + TRANSFORM( Ve.cnofact , "99999999" ) AS 'cName',;
>    Ve.iid;
>    FROM amline!cfiltre cf INNER JOIN amline!Vente Ve ON Ve.iid = cf.itelephoneid ;
>    INNER JOIN amline!Teleph T ON  Ve.itelephoneid = T.iid ;
>    INNER JOIN amline!Resident R ON  T.iid = R.itelephoneid ;
>    IF nOrdre= 1
>     ORDER BY 1 DESC INTO CURSOR cNames
>    ELSE
>     ORDER BY 1 INTO CURSOR cNames
>    ENDIF
>  ENDTEXT
>
>
>
>bernhart

Bernhart, within < < and > > (no spaces) delimiters you can put conditional code eg:
<<IIF( lCond, 'insert this', 'otherwise insert this' )>>
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Reply
Map
View

Click here to load this message in the networking platform