🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: trigger to get sum

#301
From: Isaac
Date: Sun, 18 May 2008 17:19
10 lines
1427 bytes
Here is what I am trying to do:
I have a table that will store average cost for an item so I want to sum 
all quantities and divide on total cost for that item, this average cost 
is giving me headache I also need to sum the beginning balance quantity 
and cost on all purchase orders

all this should be done on the fly whenever an item quantity or purchase 
price is changed in any order.

Thanks
Technical Details
Message-ID: <4830653d$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!news.isoc.lu!newsgroups.borland.com!not-for-mail
References: <482f63f1$1@newsgroups.borland.com> <482f7efc@newsgroups.borland.com> <483029a4@newsgroups.borland.com> <48304da8$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,c564685cdb1305db
X-Google-Attributes: gid114a0e,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Sun, 18 May 2008 20:19:37 +0300
From: Isaac <no@no.com>
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
MIME-Version: 1.0
Newsgroups: borland.public.interbase.sql
Subject: Re: trigger to get sum
References: <482f63f1$1@newsgroups.borland.com> <482f7efc@newsgroups.borland.com> <483029a4@newsgroups.borland.com> <48304da8$1@newsgroups.borland.com>
In-Reply-To: <48304da8$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 41.234.198.204
Message-ID: <4830653d$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1211131197 41.234.198.204 (18 May 2008 10:19:57 -0700)
Lines: 11
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!news.isoc.lu!newsgroups.borland.com!not-for-mail