select business_unit, voucher_id, listagg( vat_txn_type_cd, ',') within group (order by business_unit, voucher_id) from ps_voucher_line awhere business_unit = 'CZ090'and voucher_id like '%656'group by business_unit, voucher_id; --把一列值转化为一行用逗号隔开. 但是要去…
From http://blog.csdn.net/wujiandao/article/details/6621073 1. Four ways to get execution plan(anytime you want, for specified sql) • Execute the SQL statement EXPLAIN PLAN, and then query the table where the output was written. • Query a dynamic per…
处理 Oracle SQL in 超过1000 的解决方案 处理oracle sql 语句in子句中(where id in (1, 2, ..., 1000, 1001)),如果子句中超过1000项就会报错.这主要是oracle考虑性能问题做的限制.如果要解决次问题,可以用 where id (1, 2, ..., 1000) or id (1001, ...) /** * <b>function:</b> 处理oracle sql 语句in子句中(where id in (1,…