HI,
I have a multivalued field with values as
A
B
C
I want it to be replaced as 'A','B','C' . I tried to do it with eval mvjoin, but the first and last values misses the quote like this
A','B','C
SPL used is:
index=* sourcetype=* host=abc NAME IN ("*A*","*B*","*C*") |stats values(NAME) as NAME by host
| eval NAME = mvjoin(NAME,"','")
Any help would be appreciated, thankyou
| eval NAME="'".mvjoin(NAME,"','")."'"
This works! thankyou
You're almost there
Modify the last eval with
| eval NAME = "'".mvjoin(NAME,"','")."'"
Hi,
Is it possible to get values like this: (ie., double quotes instead of single quotes)
"A","B","C"
This works for me
| eval NAME = "\"".mvjoin(NAME,"\",\"")."\""