COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: dipstm on 18 Nov 2008 01:09:53 AM

Title: Displaying Databse name in the report footer
Post by: dipstm on 18 Nov 2008 01:09:53 AM
Hi All,
I have a report in which at the page footer I want to display the database name.
How can I achieve this?
Thanx in advance.

Title: Re: Displaying Databse name in the report footer
Post by: Suraj on 18 Nov 2008 12:27:26 PM
for sql server: db_name()
for oracle: SYS_CONTEXT('USERENV','DB_NAME')
or,
select substr(global_name,1,instr(global_name, '.',1)-1) "DB Name"  from global_name