COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Framework Manager => Topic started by: hmw on 01 Aug 2007 10:33:10 AM

Title: Reusing Query Subjects Across Multiple Data Sources
Post by: hmw on 01 Aug 2007 10:33:10 AM
Hi,
I have multiple databases that are the exact same structure but contain different data. I am trying to make the maintenance as efficient as possible by copying the query subject I build to the different namespaces which all have different data sources. However, when I copy the query subject, it retains the original data source from where I copied it from. I can't seem to find a way to have it update to the new data source where I pasted the query subject to. Is this even possible? Will I need to recreate all of my query subjects from scratch for each data source?
Thanks so much for any insight.
Title: Re: Reusing Query Subjects Across Multiple Data Sources
Post by: rockytopmark on 02 Oct 2007 07:34:47 AM
Datasources and Namespaces have no tie to each other... they are separate, unrelated entities of the model.

You mention datasource so I assume the queries are datasource queries.  If this is the case, then rather than copying them, simply make a copy of the SQL portion of the original query subject, and then create a new Datasource query, specifying use of the different Datasource and paste in the SQL from the original.  Before you save this, be sure to change the [Datasource] name in the FROM clause to match the intended datasource of the new query.

hth... Mark