Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple SQL approach
Message
 
 
To
20/07/2011 11:50:37
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01518656
Message ID:
01518659
Views:
73
This message has been marked as a message which has helped to the initial question of the thread.
It may be a good idea to avoid VFP and SQL Server reserved keywords such as Order. Use OrderNmbr or OrderID instead.

>I am so rusty with VFP I have to re learn everything when the boss gives me a project.
>
>Here is my issue, should be simple for you guys.
>
>I have a cursor that consists of data records similar to this
>
>Fields; Order, Item, quantity, unitprice, extendedprice (qty * unitprice)
>
>each order may have multiple items
>
>I want to create a crusor that has each unique order with a total
>
>If I do a SELECT SUM(extendeprice) it gives me the sum of all orders.
>I only want the sum of the extended price for each order.
>
>since I only have one cursor involved, am I correct in using SQL statements.
>
>data example shown as a snapshot jpg image.
>
>I want to create a cursor with each individual order as a record with the sum price of all items on that order.
>
>Sorry for asking something so basic, but I am really out of touch with vfp lately.
>
>steve
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