select uk_file_id from t_repository where pk_auto_id not like '%pktrs%' and pk_auto_id>'179';得到如下数据: ------- hg180 hg181 hg182 hg183 hg184 hg185 hg186 现在我想得到这样的数据'hg180|hg181|hg182|hg183|hg184|hg185|hg186',sql语句该如何写啊?
[Quote=引用楼主 huangmin19800626 的帖子:]
select uk_file_id from t_repository where pk_auto_id not like '%pktrs%' and pk_auto_id>'179';得到如下数据:
-------
hg180
hg181
hg182
hg183
hg184
hg185
hg186
如果是10G的话可以用select XX, replace(wmsys.wmconcat(uk_file_id),',','|') from t_repository where pk_auto_id not like '%pktrs%' and pk_auto_id>'179' group by XX