can anyone tell me why this is coming as an invali...
# suiteflow
p
can anyone tell me why this is coming as an invalid expression:
DECODE((to_char({datecreated}, 'MM'), '01' , 1))
k
I think you've too many parenthesis
last one should be able to be deleted
j
there are three left brackets and three right brackets…?
but yes, remove one from both sides
sidenote: am I the only one that checks brackets from left to right by counting / adding / subtracting? Like going “1…2…….3…..2…..3…..2….1….2…..3…..2…..1……….0”
and making sure I end w/zero
k
Also your to char might actually just be an integer.
so you might also compare it to
01
instead of
'01'
though, in this case, I'd kind of wonder why you are doing it the way you are.
also - if you are doing this in a workflow - then you may be running into an instance where you need to use client script instead of SQL
What is the context in which you are doing this?
p
goal is to show total transactions created for each month
k
So this isn't in a workflow?
Also - can't you just use date created?
And put the month modifier on it?
message has been deleted