我有一個場景,我需要用SQL查詢(Oracle)抓取輸出並將結果存儲到html文件中。當用戶將得到html報告時,會有一個超鏈接的列。當用戶點擊該超鏈接時,它將顯示存儲在本地機器上的輸出。以下是我的查詢。 (之前會有另一個查詢將結果存儲在Failed.txt文件中)。從Oracle的sqlplus輸出的html超鏈接讀取輸出
select max(start_time)database,total,sum(CASE when status='Completed' then 1 else 0 end) as Completed,'< a href=''file:///C:/Users/kaushal.dave/ht_test/failed.txt''>LInks</a>' Failed,
(select count(status) from t1_exp where status not in ('Completed','Failed')) as In_queue,server
from T1_EXP group by database,total,server;
上面,查詢在數據庫中執行得很好,但是當我看到輸出時,我沒有看到Failed.txt的超鏈接。附截圖enter image description here
嘗試使用雙引號括起來的文件路徑:(當狀態=「已完成」,那麼1點否則爲0結束CASE)爲已完成,「LInks」失敗 選擇MAX(START_TIME)數據庫,總計金額, (從t1_exp中選擇計數(狀態),其中狀態不在('Completed','Failed'))作爲In_queue,服務器 來自T1_EXP組的數據庫,total,server; –
嗨,Cyrille,我已經嘗試過,但不幸的是沒有結果。 –