COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Framework Manager => Topic started by: cogboy on 16 Oct 2007 01:51:46 PM

Title: Extract From session parameter
Post by: cogboy on 16 Oct 2007 01:51:46 PM
Hi Everyone

I am having problem in using substring on the session parameter.
for example:

  session parameter:   account.personalinfo.userid
    value:                   FGT12345

I need only first three letters.

question: can i use substring / sould i create a custom session parameter?

Please help me.

Thanks

Cog Boy
Title: Re: Extract From session parameter
Post by: rockytopmark on 09 Nov 2007 07:07:08 AM
Syntax for SQL Server:

substring(#sq($account.defaultName)# ,1,3)

Syntax for Oracle:

substr(#sq($account.defaultName)# ,1,3)


sq() is a macro function to add single quotes around the string paramter, which is required by the subtring functions.  Because it is a macro function, it must be inside the # delimiters.
Title: Re: Extract From session parameter
Post by: jouleskelvin on 19 Nov 2008 08:51:30 AM
Excellent example!