Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select command
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01565071
Message ID:
01565101
Views:
40
>Moises,
>
>Be careful with using functions that return variable length strings, you might end up with wrong results, for example if the first word found in the set is only 3 chars long, that will be the assumed length of the field for the created cursor truncating other longer words, I would use CAST to avoid this, ie:
>
>
>SELECT CAST(GETWORDNUM(Prog_long,1,",")  AS C((select max(len(alltrim(GETWORDNUM(Prog_long,1,",")))) from reembolso))) AS prog_long ,  COUNT(*) AS Quant;
>  FROM reembolso;
>  WHERE reembolso.date > DATE()-thisform.days.value;
>  GROUP BY 1;
>  ORDER BY quant DESC; 
>  INTO CURSOR crsReemb
>
You can cast to a predetermined length if speed is an issue.
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform