COGNOS #PROMPT与#PROMPTMANY的语法笔记

#prompt('保证金年份',
                       'string',
                       'and credit.bank_name = 2014',
                       'and credit.bank_name =') #
                       
#promptmany('保证金年份',
                       '',
                       '',
                       'and credit.bank_name in ( ','',')') #

#prompt('cr_start', 'String', '', 'and to_char(planhead.created + 1 / 3, ''yyyy-mm-dd'') >= ')#
#prompt('cr_end', 'String', '', 'and to_char(planhead.created + 1 / 3, ''yyyy-mm-dd'') <= ')#

and to_char(planhead.created, 'yyyy-mm-dd') between #prompt ('cr_start','string')# and #prompt ('cr_end','string')#

-- 对于日期的比较还是推荐下面的方法,毕竟该是什么格式就是什么格式,如果用字符串作比较天晓得数据库会做什么,而日期格式的比较其实就是在数据库里做数字的比较这个是不会有问题的!
and planhead.created between to_date(#prompt ('cr_start','string')#, 'yyyy-mm-dd') and to_date(#prompt ('cr_end','string')#, 'yyyy-mm-dd')
请使用浏览器的分享功能分享到微信等