Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with SemiComplex SQL String
Message
 
 
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 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01220500
Message ID:
01220521
Vues:
24
>>
>>Select MaxRecs as recseq, dr.failoc, dr.faistatus ;
>>From webprddt6.drawmfai dr ;
>>inner join (select Max(RecSeq) as MaxRecs, partno group by 2  ;
>>from webprddt6.drawmfai where partno = '860637-001' ) MaxRec ;
>>on Dr.PartNo = MaxRec.PartNo
>
>Actually, this would not work. Give me 5 minutes to make it correct.
Select MaxRecs as recseq, dr.failoc, dr.faistatus ;
From webprddt6.drawmfai dr ;
inner join (select Max(RecSeq) as MaxRecs, partno group by 2  ;
from webprddt6.drawmfai where partno = '860637-001' ) MaxRec ;
on Dr.PartNo = MaxRec.PartNo and dr.ReqSeq = MaxRec.MaxRecs
Assuming PartNo + RecSeq combination is unique.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform