简体   繁体   English

BQ 查询 - 在逗号后添加空格

[英]BQ Query - add whitespace after comma

I am writing a query in BQ and it is returning a concatenated comma separated String with no whitespace.我正在 BQ 中编写查询,它返回一个没有空格的串联逗号分隔字符串。 I want to add a whitespace after the comma.我想在逗号后添加一个空格。

All the things I have tried that work in other SQL queries as in CONCAT_WS, etc. are not working.我尝试过的所有在 CONCAT_WS 等其他 SQL 查询中都有效的方法均无效。

Query:询问:

   CASE WHEN u2.reportsDown IS NULL THEN u1.reportsUp ELSE CONCAT(u1.reportsUp, ", ",   u2.reportsDown) END as accountLIST
   FROM ```

Result:
```12345,67890,09876,54321,102938,564738```

Desired Result:
```12345, 67890, 09876, 54321, 102938, 564738```

Even adding a _ after the comma is not doing anything. Not even the _ is showing up.

Does anyone know how I can get a whitespace after the comma in a BQ query?

Thank you!

Was able to use the REPLACE function in BQ to add the whitespace能够在 BQ 中使用 REPLACE function 添加空格

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM