Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Report Calculations with SQL
Message
De
15/04/2000 06:21:07
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
14/04/2000 23:49:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00359977
Message ID:
00359994
Vues:
8
>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


Joao,
You could have extra calculated field in your SQL. For example :
select *, quantity*price as "Extended" from orditems
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
Répondre
Fil
Voir

Click here to load this message in the networking platform