![](/img/trans.png)
[英]INFORMATICA Using transformation to get desired target from a single flat file (see pictures)
[英]Add a total row at the bottom of the output in informatica target flat file
我正在尋找 informatica powercenter 中的解決方案,它可以讓我在輸出的底部添加一個總行。我目前正在使用 Oracle Sql 格式和 Sql 開發人員應用程序中的代碼
電流輸出
StudentName History Math Science
John Doe. 10. 20. 30
John Watts. 30. 50. 20
想要的輸出
StudentName History Math Science
John Doe. 10. 20. 30
John Watts. 30. 50. 20
Total. 40. 70. 50
您也可以在 informatica 中嘗試此操作。
SQ ->... -> EXP ------>|
| UNI -> TGT
|-> AGG-->|
最簡單的方法可能是union all
。 如果你真的想要最后一行,那么:
select tt.*
from ((select studentname, history, math, science
from t
) union all
(select 'Total', sum(history), sum(math), sum(science)
from t
)
) tt
order by (case when studentname = 'Total' then 1 else 2 end) desc,
studentname
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.