Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Select with Group by and Order by
Message
 
 
To
28/04/2010 09:42:11
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6 SP5
Miscellaneous
Thread ID:
01462119
Message ID:
01462331
Views:
52
>>In VFP9 you can combine two of them into one using derived tables.
>
>Yes but as I said no need to combine.
>
>>
>>In VFP6:
>>
>>select max(Master_ind) as Master_Ind, Master_Code, count(*) as RecCount from myTable T1
>>where Master_Ind = 'Y' or not exists(select 1 from myTable T where T.Master_Code  = T1.Master_Code and Master_Ind = 'Y')
>>group by Master_Code
>
>How would this do what he wants? Even if it did (I don't think it would but thinking if it were right) then can you really have an updateable view out of this???
>
>Cetin

I also don't think he can make an updatable view of this (this request left me puzzled last night). I just wanted to show a way to add the extra count column to the original query in VFP6.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform