Cognos BI版本:10.2.2使用報告工作室
我有一個提示p1及其基於sql查詢的報告。
提示UI: P1是DROPDOWNLIST(使用價值,顯示值)
1-ALL,2-值2,3-值3,-4-值3向Cognos 10基於sql的查詢添加條件提示
我試圖添加條件基於提示語法SQL查詢..
select col1, col2, col3, col4 from table1
where col4 is not null
case when #Prompt('p1')# = 1 then ' and 1=1'
when #Prompt('p1')# = 2 then ' and col1 is null and col2 is not null'
when #Prompt('p1')# = 3 then ' and col1 is not null and col2 is null'
when #Prompt('p1')# = 4 then ' and col1 is null and col2 is null'
end
我試圖在網上使用很多語法搜索,但找不到與我的方案相關的示例。我需要在實現書寫,以滿足我的requirement.any幫助表示讚賞的語句的正確方法幫助..
而你的問題是什麼? – GurV
對不起。我試圖在網上使用大量的語法搜索,但無法找到有關我的例子。我需要幫助實現寫出這些陳述的正確方式來滿足我的要求。 – fidel