COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Framework Manager => Topic started by: brianmangan on 31 Jul 2015 11:56:33 AM

Title: Using SQL Server scalar functions as values for Stored Procedures in FM
Post by: brianmangan on 31 Jul 2015 11:56:33 AM
Hello all!

I am trying to use some UDFs (scalar) as values for stored procedures.

Setup:
Cognos BI: 10.2.1 All components installed on the same server
Database: SQL Server 2008, connected with SQL Server 2008 native client and MSFT JDBC 4.0
Query Processing: Limited Local

Model:
(http://i.imgur.com/Mgm0bMC.png)

Query Subject (stored procedure imported via Metadata Wiz):
(http://i.imgur.com/a3MOhS5.png)

Imported Functions (MDW):
(http://i.imgur.com/5s0xrkI.png)

Exemplar Scalar Function:
(http://i.imgur.com/Oew10Jy.png)

Situation:
- I am not a cognos developer, just the poor schmuck stuck with this task.
- I officially have 3 days of cognos experience. Everything you see here is my own handywork, would love general feedback.
- We have to use these stored procedures
- We have to use these UDFs, yes we could write them in cognos and call it a day, DBAs are jerks.

Steps taken so far:
- Created a stored procedure that returns a single row table with the date values
- Created a bunch of calculations that pull the values from the UDFs

Possible ideas?:
- Macro calculation in the Query Subject definition for the values (what syntax?)
- Relationship (no workie)

Question:
How the heck do I get these damn Query Subjects that are modeled off of stored procedures to accept UDF scalar values?