Re: Inserting calculated values
From: Roji. P. Thomas (lazydragon_at_nowhere.com)
Date: 08/10/04
- Next message: John Bell: "Re: How to find out if a login has permission for an obj?"
- Previous message: Tor Inge Rislaa: "Inserting calculated values"
- In reply to: Tor Inge Rislaa: "Inserting calculated values"
- Next in thread: Tor Inge Rislaa: "Re: Inserting calculated values"
- Reply: Tor Inge Rislaa: "Re: Inserting calculated values"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 10 Aug 2004 12:27:23 +0530
assuming all the elements in the formula are column names.
UPDATE invoice
SET calculatedprice = SUM((unitprice * (unit_qty /factor)) - ((unitprice *
(unit_qty
/factor)) * discount / 100))
-- Roji. P. Thomas Net Asset Management https://www.netassetmanagement.com "Tor Inge Rislaa" <tor.inge.nospam@rislaa.no> wrote in message news:ea_Rc.120$g%5.1656@news2.e.nsc.no... > I have the query below, giving me the "calculatedprice" for one " invoice_id > ". I have inserted a new field in the invoice table where I want to update > the "calculatedprice" for every "invoice_id" in the table. How is that done? > > SELECT SUM((unitprice * (unit_qty /factor)) - ((unitprice * (unit_qty > /factor)) * discount / 100)) AS calculatedprice > FROM invoice > WHERE invoice_id = 2025 > > TIRislaa > > > >
- Next message: John Bell: "Re: How to find out if a login has permission for an obj?"
- Previous message: Tor Inge Rislaa: "Inserting calculated values"
- In reply to: Tor Inge Rislaa: "Inserting calculated values"
- Next in thread: Tor Inge Rislaa: "Re: Inserting calculated values"
- Reply: Tor Inge Rislaa: "Re: Inserting calculated values"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|