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'.
i found the solutions :
to_char(add_months(current_date,-1),'YYYYMM')