vertica 列转行的sql
with t1 as (select 1 as id union all select 2 union all select 3 union all select 4 union all select 5), t2 as (select '100,200,300' as client_id) select t1.id, regexp_substr(t2.client_id, '\d{3}', 1, t1.id) as client_id from t2 join t1 on 1=1 order by t1.id
作者:Lave Zhang
出处:http://www.cnblogs.com/lavezhang/
本文版权归作者所有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。