Oracle?????????????
???????????? ???????[ 2012/11/27 9:57:11 ] ????????
??????????????????У????????????????в??????????????????????????????
?????????б?TEMP_TABLE??ID??NAME??CODE???????????£?
select t.* from temp_table t;
ID NAME CODE
1 A 10
2 B 20
3 C 30
4 A 40
5 A 50
6 A|B|C 60
?????????NAME=A?????????????Oracle????WM_CONCAT()??SQL????????£?
select t.name??to_char(wm_concat(t.code))
from temp_table t
where name='A'
group by t.name;
NAME CODE
A 10??40??50
???????WM_CONCAT????????CLOB??????????????TO_CHAR???????????????????????REPLACE??????????е?‘??’???????????????????????
??????????????ν????????????????????????????????????е?ID=6????????NAME=A|B|C????????????????????SQL???????£?
SELECT id?? REGEXP_SUBSTR(name?? '[^|]+'?? 1?? rn) b
FROM temp_table?? (SELECT ROWNUM rn FROM DUAL CONNECT BY ROWNUM <= 50)
WHERE REGEXP_SUBSTR(name?? '[^|]+'?? 1?? rn) IS NOT NULL;
ID NAME
1 A
2 B
3 C
4 A
5 A
6 A
6 B
6 C
???????У?REGEXP_SUBSTR?????????????????????‘|’???????????NAME??????????????У??????NAME=A|B|C???????????????????????????FROM????????(SELECT ROWNUM rn FROM DUAL CONNECT BY ROWNUM <= 50)??????50???????????????????????????????????????3?????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11