multiple currency value [message #621608] |
Thu, 14 August 2014 17:31 |
|
dariusd7
Messages: 24 Registered: August 2014
|
Junior Member |
|
|
I am sitting here with a group of fello students and we are stumped.
This is what it says.
Add a column that contains multiple values for the price in five different currencies. The price is always added in this order:Francs, Yen, Pesos, Pounds, and Euros...
We cannot figure this one out..how do you get a column to accept multiple currency types..and then its says it has to happen in a certain order..seems like it would create some sort of drop down list..
Any suggestions...Oh and we have researched the Oracle.com sight.. I searched under data types.. and really couldn't find anything..
|
|
|
|
|
|
|
|
|
Re: multiple currency value [message #621625 is a reply to message #621623] |
Fri, 15 August 2014 00:59 |
|
Littlefoot
Messages: 21807 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Well, when nested tables were "invented", I thought it was a good idea. However, I found out that they just make things more complicated than they should be, so I never implemented them. This is the right time to remember Black Swan's words, saying that the fact that something can be done, doesn't mean that it should be done.
However, as a student, you don't have a choice - either you implement them, or you fail an exam.
|
|
|
|
|
Re: multiple currency value [message #621656 is a reply to message #621608] |
Fri, 15 August 2014 10:20 |
John Watson
Messages: 8929 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Here's an example that may help you get started:orclz>
orclz> create type mytype as varray (3) of number;
2 /
Type created.
orclz> create table mytab(c1 mytype);
Table created.
orclz> insert into mytab values(mytype(1,2,3));
1 row created.
orclz> select * from mytab;
C1
----------------------------------------------------------
MYTYPE(1, 2, 3)
orclz>
|
|
|
|