COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: cogcurious on 16 Apr 2012 02:26:58 AM

Title: Functions in Cognos
Post by: cogcurious on 16 Apr 2012 02:26:58 AM
What the significance of having some funtions preceded with an underscore such as _addmonths etc...
Its said that we should use database functions instead of Cognos functions. How do you distinguish between a database function and a cognos function.
What happens if i use a function from the folder Oracle in a report thats running against DB2...Does Cognos server do some conversion?
Title: Re: Functions in Cognos
Post by: blom0344 on 16 Apr 2012 05:40:30 AM
The opposite is true. Use Cognos functions so the UDA can compile them to the correct corresponding RDBMS function. ThAT way you can define RDBMS independant solutions with Cognos.  Defining Oracle functions will cause issues when running against DB2 (unless the function is ANSI compatible)
Title: Re: Functions in Cognos
Post by: cogcurious on 05 Jun 2012 11:59:07 AM
ok...Whats the difference between _addmonths and addmonths...i can't remember the exact function name for the later, but there are two that are almost the same.. except for the _ at the start...
Title: Re: Functions in Cognos
Post by: blom0344 on 05 Jun 2012 02:58:31 PM
Cognos is AFAIK the only one to come up with underscores at the beginning of a function name, so when you use it you know you got a Cognos one.
add_months is , i believe , an Oracle function..