Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Select with Group by and Order by
Message
De
28/04/2010 09:46:55
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
01462119
Message ID:
01462333
Vues:
43
>>>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.

OK setting updatable view aside, still I can't see how that query would do what he wants?
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform