How to SELECT QUERY inside Drill-Through TI?

Post Reply
bunchukokoy
Regular Participant
Posts: 197
Joined: Thu Dec 03, 2009 8:47 am
OLAP Product: IBM Cognos TM1
Version: 10.2.2.x
Excel Version: 2010
Location: Singapore

How to SELECT QUERY inside Drill-Through TI?

Post by bunchukokoy »

Hi Guys,

Is there a way that I can use Select statement query in Advanced Tab in TI? What I want is for me to be able to modify easily the parameters first before I pass them on the Select query. This is inside a drill-through process, where at the Epilog Tab, a RETURNSQLTABLEHANDLE is executed.

How about ODBCOutput? As far as I know, that's only for updating/inserting data to the database.

Can anyone help. :) :)

Thanks.

Bunch
lotsaram
MVP
Posts: 3706
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: How to SELECT QUERY inside Drill-Through TI?

Post by lotsaram »

You can basically do whatever you like to modify an SQL query in the prolog of a drill process.

The process will automatically have a parameter created for every dimension in the cube being drilled from which will capture the name of the element at the cell intersection from which the drill is triggered. You can modify the parameter values any way you want (but in a drill process you can't add additional parameters, ... well actually you can but the values won't be recognised).

As there can be quite a bit of asymetry between the cube intersection drilling from and the relational table or query being drilled to it can be very messy mucking around with the parameter values to end up with the desired query. Often or even most of the time it is just easier to parse your query together however you like and then just assign the value DataSourceQuery in one go. If you search the forum for "dataSourceQuery" you should get a godd head start on what you need to do.
bunchukokoy
Regular Participant
Posts: 197
Joined: Thu Dec 03, 2009 8:47 am
OLAP Product: IBM Cognos TM1
Version: 10.2.2.x
Excel Version: 2010
Location: Singapore

Re: How to SELECT QUERY inside Drill-Through TI?

Post by bunchukokoy »

Hi! Lotsaram,

Thank you for the information. Now I can combine all drill-through processes into just one TI.
However, on the publib documentation, 'dataSourceQuery' is under TM1 9.4 FP3. What I use now is a 9.4 FP1, so I'm thinking this might not work.
But I will try Lotsaram. Thanks for the information. :D

Bunch
bunchukokoy
Regular Participant
Posts: 197
Joined: Thu Dec 03, 2009 8:47 am
OLAP Product: IBM Cognos TM1
Version: 10.2.2.x
Excel Version: 2010
Location: Singapore

Re: How to SELECT QUERY inside Drill-Through TI?

Post by bunchukokoy »

Hi! Lotsaram,

It does work. Thanks! :D :D
Post Reply