Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need Help with SQL Statement
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00050724
Message ID:
00050904
Views:
32
>>>>>>>>>Sorry, it's two lines:
>>>>>>>>>select * from table1 into cursor tmp1 order by customer,date
>>>>>>>>>select * from tmp1 group by customer
>>>>>>>>
>>>>>>>>Ed:
>
>>SELECT *;
>> FROM Table1;
>> GROUP BY CUSTOMER;
>> ORDER BY ORDER_DATE
>>
>>However, because Isaac pointed out that the they weren't, the above will return inaccurate results, regardless of existing indexes. It's just another instance where making assumptions can get you into trouble, since the above will take the last *PHYSICAL* record in the table, rather than any ordering indication to the contrary.
>>
>>BTW, being the son of a musician, I'm wondering if there's any relation between your company and Better Music Insitute.
>>
>>George
>
>George, isn't this exactly the reason Ed used two SELECT statements?
>
>Barbara

Barbara,

Exactly right, and I was simply complimenting Ed on his insight. There is one danger, I believe, with two SELECTs. If the result set of the first is large (10,000 or more) you may get a message saying that the second query must be generated from a table.

George
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform