Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Complex select
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01132829
Message ID:
01132843
Vues:
15
>>try
>>
>>
>>* the data space
>>SELECT Trans1.cTrans_pk ;
>>, MAX(Trans.yReferral_balance_amount) yReferral_balance_amount;
>>, MAX(Trans.yCurrent_balance_amount) yCurrent_balance_amount  ;
>>, SUM(Payments.yAmount_Paid) as yTotalPayments  ;
>>FROM Trans LEFT JOIN Payments ;
>>ON Payments.cTrans_fk = Trans1.cTrans_pk ;
>>   AND Payments.dPosting_date > Trans.tDate_received;
>>WHERE Trans.cResolution_Codes_fk is NULL ;
>>GROUP BY 1;
> having yCurrent_balance_amount <> yRefferal_Balance_amount - nvl(yTotalPayments,0)
>>into cursor curBalances
>>
>
>Would this work?
>
>Thanks a lot for your idea. It's much simpler that I have.

No, doesn't work with HAVING clause.
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