Oracle資料字串拼接

2021-06-06 06:49:40 字數 653 閱讀 1482

select tablename,  

ltrim(max(sys_connect_by_path(fieldname, ',')), ',') as fields

from (select tablename,

fieldname,

rnfirst,

lead(rnfirst) over(partition by tablename order by ordernumber asc) rnnext

from (select a.tablename,

a.fieldname,

a.ordernumber,

row_number() over(order by a.tablename, a.ordernumber asc) rnfirst

from vm_employeetablefields a where a.ismastertable=1 and a.employeeid=119 and a.rolemoduleid=230) tmptable1) tmptable2

start with rnfirst=1

connect by rnfirst = prior rnnext

group by tablename;

oracle擷取資料字串

主要的函式介紹 1 拼接字串 1 可以使用 來拼接字串 1 select 拼接 字串 as strfrom dual 2 通過concat 函式實現 1 select concat 拼接 字串 as strfrom dual 注 oracle的concat函式只支援兩個引數的方法,即只能拼接兩個引數...

oracle 字串拼接

create or replace procedure proc query prior department iscursor department list nosub is select dep.id,dep.name,dep.parent from department dep where ...

拼接字串

border 1 class box 標籤名稱th 是否顯示th 標籤順序th tr thead 首頁td class check 是option 否option select td class number 1option 2option 3option 4option 5option 6opti...