In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Recently, some people often ask the same sql implementation method, send it on itpub to take care of Baidu users.
If a string is separated by symbols like commas or other symbols, you want to break it into columns, such as' first field, second field, third field'.
Disassemble into
First field
Second field
Third field
The first regular expression supported with 10G
Anbob@ANBOB > SELECT REGEXP_SUBSTR ('first field, second field, third field',' [^,] +', 1 FROM DUAL 3 CONNECT BY ROWNUM select * from test11) ID NAME--1 a recollection brecrium c 2 e recorder dnbobcentury ANBOB > with temp0 as (select LEVEL lv from dual CONNECT BY LEVEL insert into testreg values ('911 meme 000 min12 meme 31')
1 row created.
Anbob@NCME > insert into testreg values ('11911 dint 554000312931')
1 row created.
Anbob@NCME > commit
Commit complete.
Anbob@NCME > select ltrim (regexp_replace (','| | vJournal'([,])','\ 100'),',') newv,v from testreg
NEWV V
--
00911,00000,0012,0031 911,000,12,31
0011911,00554000,00312,00931 11911,554000312931
My original link is on http://www.anbob.com/archives/221.html.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.