'Best Way to Split Lines

I have long query text i want to Send it Application via an API so my body look like this:

"query" : "select * from table"

But for very long query which are spread over multiple line how to format my text ?

Example :

WITH temp1 AS (
SELECT *,
  CAST(STORE AS STRING) as store_number,
  TRIM(TIME) AS timezone_code
FROM TABLE
WHERE CNTRY = 'US'
// other text
),
// other temp tables
Select temp1.a , temp2.b from temp1, temp2

How to format this ?



Solution 1:[1]

To join multiple lines into one, select them all, then select Edit ? Line ? Join Lines. You can then surround them with double quotes and put the whole query into your JSON.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 MattDMo