Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: PL/SQL based price conversion, is it possible?

Re: PL/SQL based price conversion, is it possible?

From: Mark D Powell <markp7832_at_my-deja.com>
Date: Fri, 15 Sep 2000 14:21:15 GMT
Message-ID: <8ptb83$qg2$1@nnrp1.deja.com>

In article <slrn8s4ao8.1c2.nico_at_nico.it-xchange.com>,   nico_at_monnet.to (Nicolas MONNET) wrote:
> I have a system that stores inventory list with prices;
> I want users to be able to store a currency along with
> the price, and a table with conversion values, and
> have the price returned in another currency, converted,
> upon select.
>
> Any idea how to implement that more or less automatically?
>
> --
> "Pirater" consiste à couler des bateaux, tuer et violer;
> pas à partager des logiciels et de la musique avec ses amis.
> Les criminels de la propriété intellectuels sont coupables de:
> abus de position dominante, entente illégale sur les prix,
> infraction au droit de la consommation ... vous voyez de qui
> je veux parler?
>

Sounds like a job for a function. Write a function to perform the conversion for the referenced column and then provide a view that applies the function to the price column and renames it back to price. Now when selected you get the converted price auto-magically.

--
Mark D. Powell  -- The only advice that counts is the advice that
 you follow so follow your own advice --


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Sep 15 2000 - 09:21:15 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US