So final :
[/code]
select currency_rate
from currency_rate_tab cr where
(cr.COMPANY,cr.CURRENCY_CODE,cr.CURRENCY_TYPE,cr.VALID_FROM)
in
(select cr1.COMPANY,cr1.CURRENCY_CODE,cr1.CURRENCY_TYPE, max(cr1.VALID_FROM)
from currency_rate_tab cr1 where
cr1.COMPANY='OKM' and...
Actually, it does not work!
It should be ...max(cr1.valid_from)... not min.
Also, should be <= not >=
The way it was working was to get the rate AFTER the current.
Applications Support
UK
...cr1 where
7 cr1.COMPANY='OKM' and
8 cr1.CURRENCY_CODE='AUD' and
9 cr1.CURRENCY_TYPE='1' and
10 cr1.VALID_FROM >= '01/01/2004'
11* group by cr.COMPANY,cr.CURRENCY_CODE,cr.CURRENCY_TYPE
SQL> /
group by cr.COMPANY,cr.CURRENCY_CODE,cr.CURRENCY_TYPE...
...cr1 where
7 cr1.COMPANY='OKM' and
8 cr1.CURRENCY_CODE='AUD' and
9 cr1.CURRENCY_TYPE='1' and
10 cr1.VALID_FROM >= '01/01/2004'
11* group by (cr.COMPANY,cr.CURRENCY_CODE,cr.CURRENCY_TYPE)
SQL> /
group by (cr.COMPANY,cr.CURRENCY_CODE,cr.CURRENCY_TYPE)...
...cr1 where
7 cr1.COMPANY='OKM' and
8 cr1.CURRENCY_CODE='AUD' and
9 cr1.CURRENCY_TYPE='1' and
10 cr1.VALID_FROM >= '01/01/2004'
11* group by (cr.COMPANY,cr.CURRENCY_CODE,cr.CURRENCY_TYPE)
SQL>
SQL> /
cr.COMPANY,cr.CURRENCY_CODE,cr.CURRENCY_TYPE,cr.VALID_FROM
*
ERROR...
...cr1 where
7 cr1.COMPANY='OKM' and
8 cr1.CURRENCY_CODE='AUD' and
9 cr1.CURRENCY_TYPE='1' and
10 cr1.VALID_FROM >= '01/01/2004'
11* group by (cr.COMPANY,cr.CURRENCY_CODE,cr.CURRENCY_TYPE)
SQL> /
cr.COMPANY,cr.CURRENCY_CODE,cr.CURRENCY_TYPE,cr.VALID_FROM
*
ERROR at...
...but you should not assume ALL valid_from dates are monthly. The table could be:
VALID_FROM RATE
2005-01-05 10
2005-01-19 10.5
2005-02-03 9.8
2005-02-22 10.1
2005-02-28 10.2
2005-03-06 9.9
Applications Support
UK
We have a table which holds exchange rates for various currencies:
SQL> desc currency_rate_tab
Name Null? Type
----------------------------------------- -------- -----------------
COMPANY NOT NULL VARCHAR2(20)...
I think I managed it after all!
select
ipis.contract, ipis.part_no, ipis.lot_batch_no, ipis.serial_no, ipis.qty_onhand,
nvl(
(
select
(
select
pol.buy_unit_price
from
ifsapp.purchase_order_line_tab pol
where
rownum = 1 and
pol.order_no=ith.order_no and...
I have 4 queries and need to amalgamate them to create one set of results.
The first:
select
ipis.part_no, ipis.contract, ipis.lot_batch_no, ipis.serial_no, ipis.qty_onhand
from
ifsapp.inventory_part_in_stock_tab ipis
where
ipis.qty_onhand > 0
This is the primary query which should use...
I was using NetMeeting and vnc, so surely it's as good as being on teh console (well, apart from the fact that technically the console is running those apps).
Someone here said you have to shutdown and it works fine... just need to turn it on again.
That's awkward since the first chance to...
...Instance name: IFSD
Redo thread mounted by this instance: 1
Oracle process number: 14
Unix process pid: 69852, image: oracle@IFSSERVER (TNS V1-V3)
*** SESSION ID:(16.2922) 2005-03-21 09:03:07.575
*** 2005-03-21 09:03:07.575
# The following are current System-scope REDO Log Archival related
#...
Hi Tony - thanks for the thoughts.
Actually, I am not entirely sure I need it any more and I'll explain why.
I am reading an init.ora file (Oracle config) which has this as part of it:
db_files = 1024
open_cursors = 100
control_files = ("/oracledata/IFSL/control01.ctl"...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.