我有一個請求從源刪除一些行。 此源包含3列:編號,類型,價值,和containes像一些數據:Informatica Cloud:刪除重複的條件
Id Type Value
1 Master This is the first value
1 Second This is a new value
1 Third This is not a mandatory value
2 Master Another one
2 Third And again
3 Second A new hope
3 Third A third
4 Second A single value
...
讓行的規則是:
如果單列爲一個標識,獲取現有值
否則: 如果相同的ID和「大師」多行存在,讓「大師」值
如果相同的ID和「大師」不存在,並且多行「二」存在,讓「第二」值爲
如果同一個Id和'Master'的多行不存在,'Second'不存在,'Third'存在,則獲取'Third'值。
在我的樣本的話,我想只提取:
Id Type Value
1 Master This is the first value
2 Master Another one
3 Second A new hope
4 Second A single value
我嘗試分成3個不同的來源,並加入或查詢,但沒有發現任何參數丟棄重複行。
我該怎麼做?
由於提前, BR 澤維爾
嗨,你的權利,我會嘗試這樣的,更簡單的比我的第一個解決方案。在此先感謝,我反饋如果使用我的數據類型。問候 – Cascador84
如果您需要其他排序,您可以使用表達式將其轉換爲一些整數,然後進行排序。例如。 DECODE(Type,'Master',3,'Third',2,'Second',1)會選擇Second,Third和Master。 – Maciejg
嗨,謝謝大家,它現在的作品現在更改爲最後的時間:) – Cascador84