我面臨的問題將sql查詢轉換爲oracle。實際上,我是新的oracle數據庫。如何寫這個查詢與oracle數據庫兼容
SELECT TI1.FOLDERRSN, DBO.F_OPENTAX_PROPERTYROLL_FOLDER(TI1.FOLDERRSN) ROLL,
TI1.DUEDATE DUEDATE, TI1.YEARFORBILLING,(TI1.SUMDUETAX + TI1.SUMPAIDTAX + TI1.SUMDUEPENALTY + TI1.SUMPAIDPENALTY) OUTSTANDING
FROM TAXINSTALLMENT TI1 WHERE (TI1.SUMDUETAX + TI1.SUMPAIDTAX + TI1.SUMDUEPENALTY + TI1.SUMPAIDPENALTY) > 0
AND EXISTS (SELECT * FROM TAXINSTALLMENT TI2 WHERE YEAR(TI2.DUEDATE) BETWEEN 1980 AND YEAR(GETDATE()) - 5 AND (TI2.SUMDUETAX + TI2.SUMPAIDTAX + TI2.SUMDUEPENALTY + TI2.SUMPAIDPENALTY) > 0
AND TI2.FOLDERRSN = TI1.FOLDERRSN) ORDER BY TI1.FOLDERRSN, DUEDATE DESC
任何人給我的想法改變到Oracle。
感謝
你的問題是什麼? – zaratustra 2014-09-24 08:54:51
它不在oracle中工作 – user3062776 2014-09-24 08:56:50
你有語法錯誤嗎?如果是這樣,那麼這條消息會說什麼? – 2014-09-24 08:57:01