mv_concat.asciidoc 627 B

123456789101112131415161718192021222324252627282930
  1. [[esql-mv_concat]]
  2. === `MV_CONCAT`
  3. Converts a multivalued string field into a single valued field containing the
  4. concatenation of all values separated by a delimiter:
  5. [source,esql]
  6. ----
  7. include::{esql-specs}/string.csv-spec[tag=mv_concat]
  8. ----
  9. Returns:
  10. [%header,format=dsv,separator=|]
  11. |===
  12. include::{esql-specs}/string.csv-spec[tag=mv_concat-result]
  13. |===
  14. If you want to concat non-string fields call <<esql-to_string>> on them first:
  15. [source,esql]
  16. ----
  17. include::{esql-specs}/ints.csv-spec[tag=mv_concat]
  18. ----
  19. Returns:
  20. [%header,format=dsv,separator=|]
  21. |===
  22. include::{esql-specs}/ints.csv-spec[tag=mv_concat-result]
  23. |===