Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Report Calculations with SQL
Message
De
14/04/2000 23:49:28
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Report Calculations with SQL
Divers
Thread ID:
00359977
Message ID:
00359977
Vues:
40
Hi all,

I have this SQL statement to retrive some information to my report, and now before i print it i need to do some calculations,

in my table documentoscablin i have two percent fields (discount1=5.0%,discount2=3.0%), now i need to create a field with this formula (qt*prunit-(value dicount1-value discount2) to get the liquid value. How can i do that?

select *;
from jbfic!documentoscabcli a ;
inner join jbfic!documentoslincli b ;
on a.c_tipodoc = b.c_tipodoc ;
and a.c_armazem = b.c_armazem ;
and a.c_cod_ser = b.c_cod_ser ;
and a.c_numdoc = b.c_numdoc ;
and between (a.c_tipodoc+a.c_armazem+a.c_cod_ser+a.c_numdoc, lcP, lcU) ;
left outer join jbfic!documentos c ;
on a.c_tipodoc=c.c_codigo ;
left outer join jbfic!clientes d ;
on a.c_codcli=d.c_codigo ;
order by a.c_tipodoc, a.c_armazem, a.c_cod_ser, a.c_numdoc ;
into cursor facturas

Thanks in Advance

João Batista
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform