COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: andoid95 on 26 May 2014 11:29:55 AM

Title: concatanate
Post by: andoid95 on 26 May 2014 11:29:55 AM
how to concatanate current year and previous month ?

i write this code :

case when ?p_Time_C?='comp'
then (
[Period].[Fiscal period (YYYYMM)]=  extract(year,currentdate())  ||    extract(month,_add_months (currentdate(),-1) )   
)
else ([Period].[Fiscal period (YYYYMM)]=?p_Year?||?p_Month?)
end


but i doesn't work i have this error  'sqlPrepareWithOptions' statut = '-9'.
Title: Re: concatanate
Post by: andoid95 on 26 May 2014 11:56:15 AM
i found the solutions :

to_char(add_months(current_date,-1),'YYYYMM')