Solved

Using SQL within Cognos

Posted on 2008-06-19
2
1,607 Views
Last Modified: 2012-06-21
Hi

I have a query in sql that uses temp tables and table variables.  I would like to use this to generate a report through Cognos. Firstly can anyone tell me if you can use queries containing temp tables and variables in Cognos?

Cheers
0
Comment
Question by:ac_davis2002
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 12

Accepted Solution

by:
RWrigley earned 500 total points
ID: 21821709
Your best bet for that is to create a stored procedure.  You can then either import the stored procedure into Framework Manager, or put the exec command in a SQL object in your report.  You would need to use prompt macros to insert variables into the SQL or Exec statment.

Note that Cognos has some limitations on what kinds of SP's it'll accept.  The SP has to return only one dataset; less and we'll error, more and we'll ignore the data.  There should be some information on this in the Framework Manager Users Guide.

0
 

Author Comment

by:ac_davis2002
ID: 21821841
Thanks RWrigley

Cheers
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, I am very much excited today since I'm going to share something very exciting Tool used for Analytical Reporting and that's nothing but MICROSTRATEGY. Actually there are lot of other tools available in the market for Reporting Such as Co…
Hello, In my precious Article  (http://www.experts-exchange.com/Database/Reporting/A_15280-Create-Project-in-Microstrategy-Part-I.html)we saw the Configuration part for Microstrategy which included Metadata Creation and DataSource Preparation as …
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question