Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to SQL this data
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00667033
Message ID:
00667213
Views:
30
>The trick here is to set the decimals correctly so the output is formatted as you expect. Here is the code:
>
>LOCAL lCurrentDec
>lCurrentDec=SET("Decimals")
>SET DECIMALS TO 0
>SELECT name,PADL(MIN(VAL(item)),5,"0") as "Start", ;
>	PADL(MAX(VAL(item)),5,"0") as "End" ;
>	FROM MyTable ;
>	GROUP BY name ;
>	into CURSOR curMyTable
>SET DECIMALS TO &lCurrentDec
Wouldn't it be the same as
SELECT name, ;
        MIN(item) as "Start", ;
	MAX(item) as "End" ;
	FROM MyTable ;
	GROUP BY name ;
	into CURSOR curMyTable
?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform