Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cognos impromtu - direct use of SQL?

Status
Not open for further replies.

galaxy0815

Technical User
Dec 27, 2006
39
US
Hi,

I am using Cognos Version 7.4.2025.0. Till now I just used it together with catalogs to connect against the database.

Can somebody please let me know how I can directly write an SQL Query and run it against the database (without using a catalog)? I cannot find an option like this in Impromptu.

Thanks very much in advance,
Regards,
Martin
 
Very easy...

Using the catalog...bring 1 col into a report and let it run...then go to the profile tab and click the SQL radio button. Click edit and then you can freelance SQL.

Been doing this since version 4.0!

al
 
Hi,

Thanks very much for your reply. I tried something like this before, but I thought that you can do this without a catalog at all. And when I tried using SQL within a catalog, I was logged on as a user and not as the creator. Therefore I could not find the "Edit" button.

One additional question:
If I want to use prompt values in my query how can I make sure that the user has the possiblility to choose a specific value (than the report just runs for this chosen value on a column) or if the user chooses not value, the report should run without any where clause.

Example1:
Prompt value pops up (Employeename)
User entered: Kevin
Query should look as follows:
select * from employee where Employeename="Kevin"

Example2:
Prompt value pops up (Employeename)
User entered: (no value was entered)
Query should look as follows:
select * from employee

How can I cover both ways within one report? (For the 2nd example it is also ok if the query 'reacts' on a value (for example @). Which means when the user enters an @, the query would run without any where clause)

Can somebody help me on this?


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top