Oracle Skill Enhancement Part 5 Using Strings

1. Traverse the string

2. Count the number of times a character appears in a string

3. Remove unwanted characters from strings

 

4. Separate character and numeric data

5. The query contains only alphanumeric data

6. Extract capital initials of names

7. Sort by numeric value in a string

8. Create a delimited list from rows in a table

9. Extract the nth separated substring

 

10. Decomposing IP Addresses

11. Convert delimited data to multi-value IN list

12. Alphabetize Strings

 CREATE OR REPLACE VIEW v AS
SELECT ename,
LEVEL AS lv,
substr(ename, LEVEL, 1) AS c,
'substr(''' || ename || ''', ' || LEVEL || ', 1)' AS fun
FROM emp
CONNECT BY NOCYCLE LEVEL <= length(ename) /*The loop stops for length(ename) times*/
AND PRIOR ROWID = ROWID /*The rowid of the previous loop is equal to the current rowid, that is: limit the data of the same row do conenct by*/
AND PRIOR dbms_random.value() IS NOT NULL;

13. Deduplication of the list value in the field

 

14. Identify strings that can be used as numeric values

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324094402&siteId=291194637