?
Solved

Using SQL within Cognos

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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
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…
Suggested Courses

801 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