Categories
OBIEE Concat issue

Hi,
I am trying to get 2018 Q2 from this expression
CONCAT(CAST(YEAR(CURRENT_DATE) as CHAR),' Q',CAST(QUARTER_OF_YEAR(CURRENT_DATE) AS CHAR))
However I am getting "Formula syntax is invalid." error
If I use first two or last 2 of the concat string it works but all three together not working.
Any thoughts whats wrong here.
Answers
-
Look at the syntax for OBIEE CONCAT function.
CONCAT(CONCAT(CAST(YEAR(CURRENT_DATE) as CHAR),' Q'),CAST(QUARTER_OF_YEAR(CURRENT_DATE) AS CHAR))
0 -
What Sherry George said.
You can't "invent" the number of parameters of a function yourself: CONCAT requires 2, exactly 2 parameters. You try to use 3, can't work, so embed and extra CONCAT to first concatenate 2 pieces and then concatenate again 2 pieces and done.
PS: OBIEE isn't Excel accepting as many parameters you want
0 -
Gianni Ceresa wrote:You can't "invent" the number of parameters of a function yourself...OBIEE isn't Excel accepting as many parameters you want
Amen and halleluja
0 -
Have you tried just using the pipes to concat? Something like this:
CAST(YEAR(CURRENT_DATE) as CHAR)||' Q'||CAST(QUARTER_OF_YEAR(CURRENT_DATE) AS CHAR)
0 -
Is it a regular occurrence for people to receive their answer and then take off like they were never here. A simple thank you wouldn't go astray surely?
0 -
Say "thanks"?! Are you mental?
0 -
Thanks a lot for solution. It perfectly worked.
0 -
My apologies all. I could not get chance earlier to come on board & say "Thanks you"
This board has been so helpful & you guys are very generous with your time & efforts to reply & provide guidance.
Thanks a million again !!!!
0