cognos 参数传递
0
比如:select * from user where userId = ? 我现在在前台有个查询条件是userId,我现在想如果前台传值过来就是:select * from user where userId = #promot('userId')# ;如果前台不传值过来我就直接:select * from user,就不需要那个参数了,这个该怎么弄???
没有找到相关结果
重要提示:提问者不能发表回复,可以通过评论与回答者沟通,沟通后可以通过编辑功能完善问题描述,以便后续其他人能够更容易理解问题.
3 个回复
周伟 2015-09-28 回答
赞同来自: 梁勇
select s.no,s.name from user s where #promot('userId','string','s.no=s.no','s.no=')# 注意这里userId是你传入的参数,s.no是表里的字段
JIELEE - 数据架构师 2015-09-28 回答
赞同来自:
如果是查询的条件,条件属性中,有一项设置设定为是否必需,设置为“可选”即可。
如果是写到公式内的,可以用( userId = #promot('userId')# or ?userid? is null )
天蓝佯伶 - Cognos技术人员 2015-09-28 回答
赞同来自:
这个函数的用法