Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select distinct code
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Select distinct code
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Vista
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01390055
Message ID:
01390055
Views:
105
hi all,
I have a problem that I am sure can be solved with a tweak of my code. I have a table that looks like this
order_num, unique_line_no, customer_code...
2345              123456            ABC
2345              123457            ABC
2345              123458            ABC
......
what i am trying to do is select out from this table and group by a customer code but show the number of orders that customers has as well as the number of lines. So in this case the customer has 1 order and 3 lines. I thought that something like select distinct(order_num) as cust_num_of_orders would work but to no avail. anyone point me in the right direction please.
~M
Go raibh maith agat

~M
Next
Reply
Map
View

Click here to load this message in the networking platform