您的位置:首页 > 其它

cognos 年累计 同比年累计 DB2保存小数位2位

2013-07-03 16:26 274 查看
月末如 2008-01-31

#prompt('p_month','string')#

 

 

年累计

d_date between  substr(#prompt('p_month','string')#,1,5)||'01-01'  and #prompt('p_month','string')#

 

当月数据

 a.d_date between  substr(#prompt('p_month','string')#,1,8)||'01'  and #prompt('p_month','string')#

 

 

同比年累计

date( substr(#prompt('p_month','string')#,1,5)||'01-01')-1 year  and date(#prompt('p_month','string')#)-1 year

 

DB2保存小数位2位

cast( ROUND( DECIMAL( 12345, 20, 2)/100000000.00, 2) as decimal(13,2) ) 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐