to_string.asciidoc 862 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. [discrete]
  2. [[esql-to_string]]
  3. === `TO_STRING`
  4. *Alias*
  5. `TO_STR`
  6. [.text-center]
  7. image::esql/functions/signature/to_string.svg[Embedded,opts=inline]
  8. *Parameters*
  9. `v`::
  10. Input value. The input can be a single- or multi-valued column or an expression.
  11. *Description*
  12. Converts an input value into a string.
  13. *Supported types*
  14. include::types/to_string.asciidoc[]
  15. *Example*
  16. [source.merge.styled,esql]
  17. ----
  18. include::{esql-specs}/string.csv-spec[tag=to_string]
  19. ----
  20. [%header.monospaced.styled,format=dsv,separator=|]
  21. |===
  22. include::{esql-specs}/string.csv-spec[tag=to_string-result]
  23. |===
  24. It also works fine on multivalued fields:
  25. [source.merge.styled,esql]
  26. ----
  27. include::{esql-specs}/string.csv-spec[tag=to_string_multivalue]
  28. ----
  29. [%header.monospaced.styled,format=dsv,separator=|]
  30. |===
  31. include::{esql-specs}/string.csv-spec[tag=to_string_multivalue-result]
  32. |===