0
我必須找出輸出文件名相對於輸入文件名查找相對於輸出文件輸入文件:SQL從表
select sourceid as RawFile, destinationid from audittraillogentry
where event ='67'
and innodename like '%_SFTP_%';
rawfile | destinationid
------------------------------------+--------------------------------------------
shortcodes_cdr_20140202_161239.csv | coll_DefaultCollectorGroup_0_1400591981_13
在我上面的輸入文件名稱提到的查詢結果是shortcodes_cdr_20140202_161239.csv
(這可能是多個文件&我需要找到輸出的所有文件)
現在基於上述查詢的destinationid
我發現的中間源ID
select sourceid, destinationid from audittraillogentry
where event ='80'
and innodename like '%_SFTP_%'
and sourceid = 'coll_DefaultCollectorGroup_0_1400591981_13';
sourceid | destinationid
--------------------------------------------+---------------------------------------------
coll_DefaultCollectorGroup_0_1400591981_13 | proc_DefaultCollectorGroup_0_1400591981_120
現在根據這個結果,我得到這樣
select destinationid
from audittraillogentry
where event ='68'
and sourceid = 'proc_DefaultCollectorGroup_0_1400591981_120';
喜歡我需要找到相對於所有的輸入輸出文件的輸出文件的目標ID文件&我想知道如何做到這一點,任何人都可以幫助我,這將是一個很大的幫助提前
感謝
謝謝wwkudu,我已經找到了相同的答案,反正非常感謝:) – Khanjarrr