Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL view with enginbehavior 80 ?
Message
De
09/04/2003 06:53:49
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
09/04/2003 06:20:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00775399
Message ID:
00775404
Vues:
16
>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,
Remove all fields except group by and aggregate fields (a.invoice_id, OrigAmt, Balance)
PS: Do you need it as a 'view'.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform