to_string.asciidoc 843 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. include::types/to_string.asciidoc[]
  14. *Example*
  15. [source.merge.styled,esql]
  16. ----
  17. include::{esql-specs}/string.csv-spec[tag=to_string]
  18. ----
  19. [%header.monospaced.styled,format=dsv,separator=|]
  20. |===
  21. include::{esql-specs}/string.csv-spec[tag=to_string-result]
  22. |===
  23. It also works fine on multivalued fields:
  24. [source.merge.styled,esql]
  25. ----
  26. include::{esql-specs}/string.csv-spec[tag=to_string_multivalue]
  27. ----
  28. [%header.monospaced.styled,format=dsv,separator=|]
  29. |===
  30. include::{esql-specs}/string.csv-spec[tag=to_string_multivalue-result]
  31. |===