# How to put multiple lines in Kibana SQL search?

**URL:** <https://discuss.elastic.co/t/how-to-put-multiple-lines-in-kibana-sql-search/241708>\
**Category:** Kibana\
**Created:** [July 17, 2020, 6:19pm UTC](https://discuss.elastic.co/t/how-to-put-multiple-lines-in-kibana-sql-search/241708 "2020-07-17T18:19:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kelk](https://avatars.discourse-cdn.com/v4/letter/k/13edae/32.png) [@kelk](https://discuss.elastic.co/u/kelk)\
**Post date:** [July 17, 2020, 6:19pm UTC](https://discuss.elastic.co/t/how-to-put-multiple-lines-in-kibana-sql-search/241708/1 "2020-07-17T18:19:59Z")

</div>

hi  
I'm trying to put multiline sql search (as our source-code are long and in multile lines), but even if I put escape characters, error happens. Please find screenshot

 ![Screenshot 2020-07-17 at 19.15.59](https://us1.discourse-cdn.com/elastic/original/3X/5/b/5bf29b21a1c7bc1f4c687c364a9cb3faf195e9d3.png)

```
   "type" : "json_parse_exception",
      "reason" : "Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string value\n at [Source: (org.elasticsearch.transport.netty4.ByteBufStreamInput); line: 2, column: 64]"

```

I tried putting

- \n
- \
- \  
none of these worked.

The original SQL from code is in format of

```
SELECT OriginCityName, DestCityName FROM flights 
  WHERE FlightTimeHour > 5 
        AND OriginCountry='US' 
  ORDER BY FlightTimeHour DESC
  LIMIT 10

```

which I don't want to manipulate to single line.

---

<div class="post-metadata">

**Author:** ![cheiligers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheiligers/32/73114_2.png) [@cheiligers](https://discuss.elastic.co/u/cheiligers)\
**Post date:** [July 17, 2020, 10:04pm UTC](https://discuss.elastic.co/t/how-to-put-multiple-lines-in-kibana-sql-search/241708/2 "2020-07-17T22:04:41Z")

</div>

@kelk You'll need to wrap your multi-line SQL in tripple quotes ("""SQL\_query\_goes\_here""").  
There's a handy [hint](https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-rest-overview.html#sql-kibana-console) given in the documentation 🙂

---

<div class="post-metadata">

**Author:** ![kelk](https://avatars.discourse-cdn.com/v4/letter/k/13edae/32.png) [@kelk](https://discuss.elastic.co/u/kelk)\
**Post date:** [July 18, 2020, 8:12am UTC](https://discuss.elastic.co/t/how-to-put-multiple-lines-in-kibana-sql-search/241708/3 "2020-07-18T08:12:28Z")

</div>

@cheiligers. lol, how come I missed that. thanks mate.

Hope they made the documentation as a section itself 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 15, 2020, 8:22am UTC](https://discuss.elastic.co/t/how-to-put-multiple-lines-in-kibana-sql-search/241708/4 "2020-08-15T08:22:37Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
