Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-31737

Concat array of strings into one string

    XMLWordPrintable

Details

    Description

      Given ARRAY of strings concat into single string with separator

      CONCAT_XXXX (["abcd", "pqr","xyz"], "-");
      "abcd-pqr-xyz"

      Alternative is
      SELECT REPLACE(TRIM(ENCODE_JSON(["abc","def","xyz"]), "[]\""), "\",\"", "-");

      https://forums.couchbase.com/t/array-concatenate-in-n1ql/18874

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              mihir.kamdar Mihir Kamdar (Inactive)
              Sitaram.Vemulapalli Sitaram Vemulapalli
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty