cognos报表数据项表达式函数的应用

上传人:壹****1 文档编号:550506486 上传时间:2022-11-10 格式:DOC 页数:50 大小:277KB
返回 下载 相关 举报
cognos报表数据项表达式函数的应用_第1页
第1页 / 共50页
cognos报表数据项表达式函数的应用_第2页
第2页 / 共50页
cognos报表数据项表达式函数的应用_第3页
第3页 / 共50页
cognos报表数据项表达式函数的应用_第4页
第4页 / 共50页
cognos报表数据项表达式函数的应用_第5页
第5页 / 共50页
点击查看更多>>
资源描述

《cognos报表数据项表达式函数的应用》由会员分享,可在线阅读,更多相关《cognos报表数据项表达式函数的应用(50页珍藏版)》请在金锄头文库上搜索。

1、文档编号CCBBI_PM061110_001版 本 号V1.00密 级内部资料cognos报表数据项表达式函数的应用手册文档信息项目名称北京建总行ERPF报表项目项目经理张成浩文档名称cognos报表数据项表达式函数的应用手册批复信息负责人日期意见拟制审核批准文件控制版本记录日期作者版本变更说明2006-11-10郑广珠V1.0审阅记录日期审阅者意见分发记录日期接受人地点推荐精选目录1引言51.1编写目的51.2背景51.3参考资料51.4术语定义及说明52汇总函数62.1aggregate62.2average62.3count62.4maximum72.5median72.6minimum

2、72.7moving-average72.8moving-total82.9percentage92.10percentile92.11quantile92.12quartile102.13rank112.14running-average112.15running-count122.16running-difference122.17running-maximum132.18running-minimum132.19running-total142.20standard-deviation142.21standard-deviation-pop152.22total152.23varianc

3、e152.24variance-pop153业务日期/时间函数173.1_add_days173.2_add_months173.3_add_years173.4_age183.5_day_of_week183.6_day_of_year183.7_days_between18推荐精选3.8_days_to_end_of_month193.9_first_of_month193.10_last_of_month193.11_make_timestamp203.12_months_between203.13_week_of_year203.14_years_between203.15_ymdin

4、t_between214块函数224.1_firstFromSet224.2_remainderSet225供应商特定函数(Oracle函数)235.1add_months235.2ascii235.3char_length235.4chr235.5concat245.6decode245.7dump245.8greatest245.9initcap255.10instr255.11instrb255.12least265.13length265.14lengthb265.15lpad265.16ltrim275.17months_between275.18new_time275.19next

5、_day275.20nls_initcap285.21nls_lower285.22nls_upper285.23nvl285.24replace295.25round295.26rpad295.27rtrim305.28sign305.29soundex305.30substr30推荐精选5.31substrb315.32to_char315.33to_date315.34to_number315.35translate325.36trunc325.37trunc325.38vsize325.39sysdate335.40user336Oracle Cast函数346.1cast_varch

6、ar346.2cast_timestamp347Oracle数学函数357.1Log358Oracle三角函数368.1acos368.2asin368.3atan368.4atan2368.5cos378.6cosh378.7sin378.8sinh378.9tan388.10tanh389通用函数399.1_format399.2_round399.3abs399.4cast399.5ceiling409.6character_length409.7coalesce409.8current_date409.9current_time419.10current_timestamp419.11

7、exp419.12extract419.13floor42推荐精选9.14ln429.15localtime429.16localtimestamp429.17lower439.18mod439.19octet_length439.20position439.21power449.22sqrt449.23substring449.24trim449.25upper45推荐精选1 引言1.1 编写目的整理cognos的report studio中在数据项表达式中比较常用的函数的应用。并可供以后需要用到的同事参考。1.2 背景在开发报表过程中积累的一些经验和总结。1.3 参考资料Cognos中的帮

8、助文档和oracle的参考文档。1.4 术语定义及说明推荐精选2 汇总函数2.1 aggregate用法:aggregate ( expr auto )aggregate ( expr for all | any expr , expr )aggregate ( expr for report )作用:根据表达式的聚合类型,返回使用相应的聚合函数计算得出的值。Example:aggregate (本期余额)根据数据项本期余额的聚合类型,返回使用相应的聚合函数计算得出的值。如果本期余额是sum()得到,则返回所有本期余额的合计。2.2 average用法:average ( distinct e

9、xpr auto )average ( distinct expr for all | any expr , expr )average ( distinct expr for report )作用:返回选定数据项的平均值。关键字distinct的作用是,当某个数据项有多个重复的项时,当中只有一个数据项有效。Example:average ( 本期余额 )返回所有本期余额的平均值2.3 count用法:count ( distinct expr auto )count ( distinct expr for all | any expr , expr )count ( distinct exp

10、r for report )作用:返回选定数据项的数量,但不包括NULL值。关键字distinct的作用是,当某个数据项有多个重复的项时,当中只有一个数据项有效。Example:count( 行号 )返回所有行号总的数量。推荐精选2.4 maximum用法:maximum ( distinct expr auto )maximum ( distinct expr for all | any expr , expr )maximum ( distinct expr for report )作用:返回选定数据项的最大值。关键字distinct的作用是,当某个数据项有多个重复的项时,当中只有一个数据

11、项有效。Example:Maximum (本期余额)返回数据项本期余额中的最大值。2.5 median用法:median ( expr auto )median ( expr for all | any expr , expr )median ( expr for report )作用:返回选定数据项的中间值。Example:median ( 本期余额 )返回数据项本期余额中的中间值2.6 minimum用法:minimum ( distinct expr auto )minimum ( distinct expr for all | any expr , expr )minimum ( di

12、stinct expr for report )作用:返回选定数据项的最小值。关键字distinct的作用是,当某个数据项有多个重复的项时,当中只有一个数据项有效。Example:minimum ( 本期余额 )返回数据项本期余额中的最小值2.7 moving-average用法:推荐精选moving-average ( numeric_expr , numeric_expr at exp , expr prefilter )moving-average ( distinct numeric_expr , numeric_expr prefilter ) := for expr , expr | for report | auto作用:按行返回指定的一组值在指定行数上的移动平均值。定义函数范围。at option定义聚合级别,只能在关系数据源上下文中使用。关键字distinct的作用是,当某个行有多个重复的行时,当中只有一个行有效。Example:moving-average (本期余额,3)对应的每一行,返回当前行的数量值和当前行与前面两行共三行的平均值为当前行的一组值本期余额moving-average (本期余额,3)200NUL

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 医学/心理学 > 基础医学

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号