Solved

Using SQL within Cognos

Posted on 2008-06-19
2
1,595 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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 …
How to increase the row limit in Jasper Server.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

867 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now