🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #11351

SQL - Calc.Field

#11351
From: Henry Olive
Date: Sat, 23 Nov 2002 18:40
28 lines
1600 bytes
IB6, D6

Detail Table : Trs Means ( Transfer from last year )
PK=Recnum,LineNum

PARTNO    TRSQty   BUYQty   SELLQty
--------------------------------------------
AAA            2                0               0
BBB             0                2               0
AAA            0                0               1


Part Table :  PK=PartNo
PARTNO        COSTPRICE
------------------------------
AAA                   100.00
BBB                    250.00

I need Current Inventory Value.
InvValue:=600.00.-
( which is ,  1 * AAA (100.00)   +  2 * BBB( 250.00) )

Something like below.
SELECT SUM(D.TRSQty + D.BUYOty - D.SELLQty)*P.COSTPRICE
FROM DETAIL D, PARTS P
WHERE(P.PARTNO = D.PARTNO)

Thank you.
Technical Details
Message-ID: <3ddfcb72@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-04!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 114a0e,efe094e56bbe5a1b,start
X-Google-Attributes: gid114a0e,public
X-Google-ArrivalTime: 2002-11-23 11:08:54 PST
From: "Henry Olive" <zed@zedltd.com>
Newsgroups: borland.public.interbase.sql
Subject: SQL - Calc.Field
Date: Sat, 23 Nov 2002 20:40:33 +0200
Lines: 36
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
NNTP-Posting-Host: 195.175.163.170
Message-ID: <3ddfcb72@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1038076786 195.175.163.170 (23 Nov 2002 10:39:46 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-04!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail