Michel,
The m.euroansi is a public variable, so you don't have to restore it before every select.
>>I would copy european.mem into application directory and restore from there. Don't forget to use ADDITIVE clause or RESTORE FROM will kill all your memory variables. See
Re: Function to return base alpha set from a string Message #
667735 for another ways to handle this.
>
>I've been trying to figure out why the RESTORE command was causing WWC to invoke error. The ADDITIVE clause makes it work ok.
>
>Basically, the SQL now looks like this:
>
>
>* We don't want our report to have two entries for cities having French characters
>* So, Montreal and Montréal will be processed together
>RESTORE FROM (gcMainAll+'european.mem') ADDITIVE
>SELECT SYS(15,m.euroansi,Ville) AS Ville,UPPER(SYS(15,m.euroansi,VILLE)) AS Ville2,;
> COUNT(*) AS Compte FROM Member WHERE ...;
> ORDER BY 3 DESCENDING GROUP BY 2 INTO CURSOR Temp
>
>
>Even with two SYS(15) in it, it works as fast.
>
>Also, in order to proceed to show members from Montreal, for example, I have to plug the SYS(15) in the where clause of the SQL:
>
>
>* We don't want our report to have two entries for cities having French characters
>* So, Montreal and Montréal will be processed together
>RESTORE FROM (gcMainAll+'european.mem') ADDITIVE
>
>SELECT ... FROM Member;
> WHERE ... AND UPPER(SYS(15,m.euroansi,VILLE))=lcCity;
> INTO CURSOR Temp
>
--sb--