Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Using SQL within Cognos

Posted on 2008-06-19
2
Medium Priority
?
1,630 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 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Problem Statement In an SAP BI BO Integration project when a BO universe is built on a BEx query, there can be an issue of unit & formatted value objects not getting generated in a BO universe for some key figures. This results in an issue whereb…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

636 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