If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

SQL Window Functions

Started by dougp, 21 Oct 2020 12:50:22 PM

Previous topic - Next topic

dougp

Using Cognos 11.0.13 with a relational model...

Is it possible to use SQL window functions (like LEAD, LAG, etc.) without using SQL objects using Native or Pass-thru SQL syntax?

I see some SQL window functions are possible.  For example:

total([Sales (query)].[Sales].[Quantity] for [Sales (query)].[Branch].[Country], [Sales (query)].[Branch].[Province or state], [Sales (query)].[Branch].[City])

...produces...

    SUM("SQ0_Query1"."Quantity")
        OVER(
            PARTITION BY
                "SQ0_Query1"."Country",
                "SQ0_Query1"."Province_or_state",
                "SQ0_Query1"."City"
        ) AS "Quantity1"


...but I can't see how to use LEAD and LAG.

Alternatively, is there a way to configure a data item expression (not the whole query) as pass-thru?