Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need SQL Tricks
Message
From
21/07/1999 15:44:59
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00244102
Message ID:
00244311
Views:
16
Aiko,

>>I want put sql code like Group by substr(userid,5,2).
I tried that but VFP 6 does not seem to like it.
Column not found error message comes on. Off cause
this could be FoxFire's(I am beta testing Fox Fire)
limitation that I don't know about. <<

Foxfire! makes it easy to provide this kind of grouping. You just need to add a item to the data dictionary that uses your SUBSTR expression as the new data item's expression. It's also a good idea to use the table alias in the expression, so use:

SUBSTR(tablealias.userid,5,2)

... where "tablealias" is the alias as specified for the item in the dictionary.

Once this item is created, you can use it when creating Foxfire! reports. Foxfire! has a sorting and grouping dialog that allows you do select which items to Group By. Foxfire! will then automatically generate the SQL with the appropriate Group By clause.

Bill
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform