2012-10-25 23 views
0

我需要在COGNOS框架管理器中嵌入原生的oracle sql语句。这个链接描述了如何做到这一点。 e.g:将Cognos框架内的原生sql嵌入到接受参数的框架管理器管理器中

select cust_name from cust where cust_id = '111' 

http://businessintelligence.ittoolbox.com/groups/technical-functional/cognos8-l/native-query-in-framework-manager-query-subject-2374263

现在是有办法嵌入COGNOS FM内的SQL也接受一个参数。 E/G:

select cust_name from cust where cust_id = ? 

回答

0

您可以使用提示宏如下所述:
Creating prompts with query macros
你的表情应该是这个样子:

select cust_name from cust where cust_id = #prompt('prmCutsId','integer')# 

Ofcourse,你可以通过提供展开默认值,或者使用promptmany宏来提供值列表(而不仅仅是一个值)。

您可以使用Cognos中的宏确实做出很好的事情,但您必须确切知道您在做什么。