COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Administration and Security => Topic started by: Niranjan81 on 22 May 2017 02:59:31 PM

Title: Using Command blocks in Cognos datasource
Post by: Niranjan81 on 22 May 2017 02:59:31 PM
Hi,
I am using Cognos JDBC datasource . Due to the complexity of the queries , I need to pass few database hints as part of the cognos query to the datasource.
Can anyone advise , how to pass STRAIGHT_JOIN from Cognos to the database using the command blocks.
I tried to set by opening a command block, but it did not help.
The query from Cognos should form something like this.
select STRAIGHT_JOIN c1, c2, c3 from t1,t2...

Thanks,
NC
Title: Re: Using Command blocks in Cognos datasource
Post by: the6campbells on 07 Jun 2017 06:06:49 PM


Command blocks can alter session state.

If a vendor allows optimizer settings to be controlled at the session level (as some do) then you might find an appropriate 'set' command.

In your case, your vendor most likely requires that clause placed in-line within a statement.

Hence the answer would be you cannot