Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL count without French characters
Message
From
02/12/2002 11:29:10
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00728525
Message ID:
00728633
Views:
30
>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
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform