![](/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.