If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

getting the generated sql out of a cognos created query

Started by iouwon, 12 Jun 2009 05:17:26 AM

Previous topic - Next topic

iouwon

Hi,

We have business analysts who create queries using the cognos web app to find clients of our business who they want to target for marketing purposes.  they can export the data via csv and we can feed that into the automated system we're building for them but we expect the size of this data to be in the gigabytes and would like to be able to use the sdk to get at the query definitions of the queries they save in cognos so that we can execute the queries and import the data directly using federation in db2.

We can see from the documentation that a query object contains a reportVersion object which contains an SQL object which it says is the sql generated by the definition of the query.

Does anybody know how to get at this information using the SDK because the properties of the query object don't seem to provide access to the reportVersion object and the reportVersion object doesn't seem to provide access to the SQL object.

Regards,
Luke


iouwon

brilliant.  that looks perfect.  i'll let you know how i get on

jonathanmunge

Hi the Sample code from the ibm website was great!

However I noticed that the code returns everything from the xml to both the native and cognos SQL is possible to edit it so that it only returns the native SQL?

akhanchandani1

Hello,

It seems like IBM has removed the URL's

http://www.ibm.com/support/docview.wss?uid=swg21344260

Can some one please help with the sample code, I am specifically looking for extracting SQL queries from Report.

Thanks