Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report Calculations with SQL
Message
From
14/04/2000 23:49:28
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Report Calculations with SQL
Miscellaneous
Thread ID:
00359977
Message ID:
00359977
Views:
39
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
Next
Reply
Map
View

Click here to load this message in the networking platform