是否可以通过 SQL 在 cognos 中传递参数?

Is it possible to pass parameter in the cognos by SQL?

我有 SQL 查询 "select * from all_objects where owner = : owner;"。是否可以在 cognos 10.2 中使用此查询创建提示。2.Please 建议我。

您可以使用提示宏。带有宏的 SQL 看起来像这样:

SELECT * FROM all_objects WHERE owner = #sq(prompt('owner','string',''))#

prompt() 函数的第三个参数指定了一个默认值。如果您提供一个,提示将变为可选。