Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select command
Message
From
04/02/2013 14:25:52
 
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:
01565095
Views:
70
This message has been marked as the solution to the initial question of the thread.
>Hi Rich
>
>I replaced it as you said:
>
>SELECT GETWORDNUM(Prog_long,1,",") , COUNT(*) AS Quant FROM reembolso GROUP BY prog_long where reembolso.date > DATE()-thisform.days.value INTO CURSOR crsReemb ORDER BY quant DESC
>
>But I got the error message "variable not found".
>
SELECT GETWORDNUM(Prog_long,1,",")  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
>It seems the command is not accepted in a line, or am I doing something wrong ?
>
>Moises
>
>
>>>I am using the code below to group results,but the problem is that some records have a comma which duplicates some results
>>>
>>>eg:
>>>
>>>Yellow
>>>blue
>>>blue,
>>>green
>>>red
>>>red,
>>>
>>>Is there a way to remove the comma only from the the result of the code below without removing the commas from the original table ?
>>>
>>>
>>>SELECT Prog_long , COUNT(*) AS Quant FROM reembolso GROUP BY prog_long where reembolso.date > DATE()-thisform.days.value INTO CURSOR crsReemb ORDER BY quant DESC
>>
>>Try......
>>
GETWORDNUM(myfield,1,",")
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform