Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping in SELECT

Status
Not open for further replies.

torturedmind

Programmer
Jan 31, 2002
1,052
PH
Good day to all.

I have a table say:

[tt]ordr_no ordr_qty
------- --------
P070001 5520
P070002 1833
P070003 12914
P010004 756[/tt]

Is it possible to have an output like this using just the SELECT statement?

[tt]ordr_no pckg_qty
------- --------
P070001 1000
P070001 1000
P070001 1000
P070001 1000
P070001 1000
P070001 520
P070002 1000
P070002 833
P070003 1000
P070003 1000
P070003 1000
P070003 1000
P070003 1000
P070003 1000
P070003 1000
P070003 1000
P070003 1000
P070003 1000
P070003 1000
P070003 1000
P070003 914
P010004 756[/tt]

I could do it using plain codes but is it possible to do using SELECT? Am using VFP6, btw.


kilroy [knight]
philippines

"Once a king, always a king. But being a knight is more than enough."
 
thanks cetin for the quick response. i never think it wasn't possible. i guess i was just being optimistic.[wink]

kilroy [knight]
philippines

"Once a king, always a king. But being a knight is more than enough."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top