【发布时间】:2021-05-07 11:54:02
【问题描述】:
当使用XMLAGG 或XMLCONCAT 时,Teradata 似乎在连接的内容之间添加了额外的空格:
with t (x) as (select 1)
select
xmlserialize(content xmlconcat(1, 2, 3) as varchar(1000)) a,
xmlserialize(content xmlagg(v order by v) as varchar(1000)) b
from (
select 1 from t
union all
select 2 from t
union all
select 3 from t
) as u (v)
以上产生:
|a |b |
|-----|-----|
|1 2 3|1 2 3|
有什么方法可以避免 XML 连接产生的额外空白伪影并得到它吗?
|a |b |
|---|---|
|123|123|
【问题讨论】: