Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Evaluate and Macro
Message
 
 
To
01/11/2004 14:23:07
Walter Meester
HoogkarspelNetherlands
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:
00956749
Views:
9
Thank walther,

it 's very kind of you !

( ISNULL( e.iid ) AND Date() => TTOD(R.dentree) AND ( Date() =< TTOD(R.dSortie) OR R.dSortie ={})) OR ;
(Date() >= e.dDebut AND (Date() =< e.dFin OR (e.dFin={} AND (!E.lTransfert OR R.dSortie = {} OR Date() =< TTOD(R.dSortie)))))



>Hi Bernhart,
>
>I tried to simplify your expression and optimize it a, by getting rid of the IIF() structures.
>
>
(e.iid IS NULL AND Dvd => TTOD(R.dentree) AND (Dvd =< TTOD(R.dSortie) OR R.dSortie ={})) OR ;
>(Dvd >= e.dDebut AND (Dvd =< e.dFin OR (e.dFin={} AND (!E.lTransfert OR R.dSort = {} OR dvd =< TTOD(R.dSortie)))))
>
>However the error you're experiencing does not seem to have to do with the macro substitution. There must be an error in the whole expression (not that I could find it from what I know).
>
>Walter,
>
>
>>I progress but I still have problems
>>
>>
>>
>> PRIVATE dvd
>>  dvd = DATE()
>>
>>
>>  ccondit1 =  "IIF(ISNULL( e.iid ), ?dvd BETW TTOD( R.dentree ) AND IIF(
>>EMPT( R.dsortie ) , ?dvd , TTOD( R.dsortie )),"+ ;
>>    "?dvd BETW e.ddebut AND IIF( EMPTY( e.dfin ) = .T.,"+;
>>    "IIF( e.ltransfert = .T. ,IIF(EMPTY( R.dsortie),?dvd ,TTOD(
>>R.dsortie )),"+ "?dvd ),e.dfin))"
>>
>>
>>  INSERT INTO Sit ( nNombre,  cCause ) ;
>>    SELECT COUNT( RECNO() )  , 'Résidants Présents dont :' FROM
>>(AMLINE!Resident AS 'R';
>>    LEFT OUTER JOIN AMLINE!Etats AS 'E' ON R.iid = e.iresidentid ) WHERE &ccondit1
>>
>>
>>
>>Missing expression (Error 152)
>>when I replace dvd by date() all functions well.
>>
>>What can i do ?
>>
>>Bedank
>>
>>bernhart
>>
>>
>>
>>
>>>Hi bernhart,
>>>
>>>>Bonjour Walter,
>>>>
>>>>What do we do if a macro is larger than 254 caractères ?
>>>
>>>You can use macro substitution with strings larger than 254 character. Probably them problem is that you cannot have literal string larger than that. so a work arround might be:
>>>
>>>
cCommand = "SELECT ... FROM ..... INNER JOIN " + "WHERE ....  "+ " INTO CURSOR x"
>>>&ccommand
>>>
>>>Walter,
Previous
Reply
Map
View

Click here to load this message in the networking platform