Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Group by summary
Message
 
 
To
06/08/2007 08:55:38
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01246096
Message ID:
01246124
Views:
27
>Dear Cetin
>
>Is it possible to use your select statement without using code reference?
>
>You use these lines
>
>between(code, 1100,1900), 1, ;
> between(code, 2000,2900), 2, ;
>
>If there are codes not between then what should we do?
>I mean if codes are between 8100,8900 and between 9100 to 9900 then?

What is the range for your codes?

See my solution of using LEFT(str(code),1) as cCode. If you want a numeric group, you may add

INT(VAL(LEFT(str(code),1)))

If your group is always in the range of 1000 and 9999, then

int(code/1000) as Code would work.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform