這是我的應用程序中的Oracle Query。關於TCURR的Oracle查詢
我認爲這是用於貨幣conversion.When我運行此查詢它拋出一個錯誤消息
試圖數據庫操作時發生錯誤: 錯誤執行數據庫查詢。
我可以知道我需要更改此查詢嗎?
查詢
SELECT count(*) AS count
FROM (
SELECT kurst AS look_up_mode_cd,
fcurr AS source_currency_cd,
tcurr AS target_currency_cd,
substr(to_char(99999999 - gdatu),1,4) AS effective_date_yr,
substr(to_char(99999999 - gdatu),5,2) AS effective_date_mnth,
(ukurs*tfact/ffact) AS multiplier_rate_amt,
to_number(to_char((1 /(ukurs*tfact/ffact)),9999999.9999999)) AS divisor_rate_amt
FROM tcurr
WHERE kurst = '001E'
AND substr(to_char(99999999 - gdatu), 1, 4) = '2016'
AND substr(to_char(99999999 - gdatu), 5, 2) = '4'
AND tcurr = 'USD'
UNION
SELECT kurst AS look_up_mode_cd,
tcurr AS target_currency_cd,
fcurr AS source_currency_cd,
substr(to_char(99999999 - gdatu),1,4) AS effective_date_yr,
substr(to_char(99999999 - gdatu),5,2) AS effective_date_mnth,
(-1 *ukurs*tfact/ffact) AS multiplier_rate_amt,
to_number(to_char((-1*1 /(ukurs*tfact/ffact)),9999999.9999999)) AS divisor_rate_amt
FROM tcurr
WHERE kurst = 'EURE'
AND substr(to_char(99999999 - gdatu), 1, 4) = '2016'
AND substr(to_char(99999999 - gdatu), 5, 2) = '4'
AND tcurr = 'EUR'
AND fcurr = 'USD'
)
當您從Oracle SQL Developer或SQL Plus執行它時,它會執行嗎?它會拋出任何ORA錯誤嗎? –