Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Always trips me up!
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
Database:
Visual FoxPro
Divers
Thread ID:
01233129
Message ID:
01233326
Vues:
22
>Vladimir's suggestion assumed that you have a PK in the child table (not that in proper design you didn't have one).

Yes, and you should always have one. When I was translating that code into Mike's structure I made a typo using wrong key.

BTW, Vladimir Maximov put this nicely into FAQ, but he told me that the idea originates from Igor Korolev.
So, they both deserve a credit.

BTW, I just used it recently myself the first time
* Idea by Igor Korolev 
SELECT * from curInvoice1 cI ;
WHERE cI.KyInvoice IN ;
(SELECT CTOBIN(RIGHT(MAX(PADL(Inv_amount,20,'0')+BINTOC(KyInvoice)),4)) ;  
  			FROM curInvoice1 GROUP BY CheckNum) ;
ORDER BY cI.CheckNum  INTO CURSOR curInvoice
I needed to pick up one invoice with the maximum amount in case we have several invoices.
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform