Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select Statement
Message
De
07/03/2003 18:17:52
 
 
À
07/03/2003 18:00:44
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00762981
Message ID:
00763111
Vues:
24
Is the paid flag relevant at all?

Sidebar...why aren't you using logical fields for these items?

Depending upon whether not you are trying to get records where a payment has been made:
* this one requires that some payment has been made
		where services.amt_paid > 0 .AND. ;
			services.billed ="YES"  .and.;
			(services.claim_no > 0 .or. ;
			services.invoice_no > 0) .and.;
			services.closeclaim <> "YES" .and.;
			(services.amt_paid - (services.feesubmit+services.feesubmit1+services.feesubmit2+;
		services.feesubmit3+services.feesubmit4+services.feesubmit5+;
		feesubmit6)) < 0

* this one has no payment requirement
		where services.billed ="YES"  .and.;
			(services.claim_no > 0 .or. ;
			services.invoice_no > 0) .and.;
			services.closeclaim <> "YES" .and.;
			(services.amt_paid - (services.feesubmit+services.feesubmit1+services.feesubmit2+;
		services.feesubmit3+services.feesubmit4+services.feesubmit5+;
		feesubmit6)) < 0
If you only want records with amount paid > 0, and if a payment can only be made when billed = "YES" and there is a claim number or invoice number, it can be simplified like this. But if prepayments are allowed, this won't work.
    where services.amt_paid > 0 AND ;
	services.closeclaim <> "YES" and;
	(services.amt_paid - (services.feesubmit+services.feesubmit1+services.feesubmit2+;
	services.feesubmit3+services.feesubmit4+services.feesubmit5+;
	feesubmit6)) < 0
>>>>If paid = "YES", your select won't select it...
>>>
>>>OK - but CloseClaim <> YES , Invoice_No is > 0 and amt_paid is < the sum of all feesubmits. All the other conditions are valid.
>>>
Steve Gibson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform