Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL view with enginbehavior 80 ?
Message
De
09/04/2003 06:20:02
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
SQL view with enginbehavior 80 ?
Divers
Thread ID:
00775399
Message ID:
00775399
Vues:
49
how can I make the following view work in vfp8 without setting engonbehavior to 70?
create sql view vInvoice as ;
Select ;
	A.invoice_ID,  ;
	INT(A.billing_ID) AS billing_ID,  ;
	INT(A.site_ID) AS site_ID,  ;
	PADR(A.invoicenum,10) as invoicenum,;
	PADR(A.billrefno,20)  as billrefno ;
	A.isedi,  ;
	A.invdate,  ;
	A.datezero,;
	A.arnotes,  ;
	A.autopay,  ;
	A.invtype,;
	A.sbill_ID,  ;
	A.issbill,  ;
	A.insuser_ID,;
	A.upduser_ID, ;
	A.insdttm, ;
	A.upddttm,;
	A.busgrp_ID,;
		B.arcode,;
		B.grpcode,;
		B.inco, ;
		B.name1,;
		B.name2, ;
		B.addr1,;
		B.addr2, ;
		B.city, ;
		B.state,;
		B.zip,;
		B.country,;
		B.isedi210,;
		B.isinvprint,;
			0000000.00 + Sum(Iif(C.xntype = 'CHARGE' And C.p3_ID = A.billing_ID,;
			ROUND(C.rate*C.qty+C.addamt,2),0000000.00)) As OrigAmt,;
			0000000.00 + Sum(Iif(C.xntype = 'CHARGE',Round(C.rate*C.qty+C.addamt,2),  -1*Round(C.rate*C.qty+C.addamt,2))) As Balance ;
	FROM Invoice A  ;
		JOIN Sites B On A.site_ID = B.site_ID   ;
	JOIN FinXn C On A.invoice_ID = C.p2_ID  And C.isgl  And C.datepost <= Date()  And (C.xntype = 'CHARGE'   Or C.xntype = 'RECEIPT'   Or C.xntype = 'ADJUST')   ;
		GROUP By 1
Thanks


Peter
Peter Cortiel
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform