Oracle string, number, special symbol, sorting

Source: Internet
Author: User

Please record Oracle strings, numbers, special symbols, and sorting problems after they are solved. It may be used at some time. Not to mention, positive T; requirement (changed based on different requirements): Sort string format: field Test course coefficient [2013] No. 29 course No. [2012] No. 233 Course Arrangement [2013] No. 44 Course Arrangement [2012] NO. 1 course arrangement [2012] NO. 34... ......... according to the requirements, the Test course No. [2012] No. 233 Course Arrangement [2013] No. 44 Course Arrangement [2012] NO. 34 course coefficient [2013] No. 29 Course Arrangement [2012] 1 after some tests and summary by our predecessors, you can use the following SQL code to_number (translate (Test, '20160301' | Test, '20160301') to view the SQL code to_number (substr (Test, instr (Test, ']') + 1, length (Test)-(instr (Test, ']') + 1) desc, in addition, any combination of numbers and strings may result in incorrect sorting, for example, ----------------------------------- tax No. 204 tax No. 205 tax No. 206 tax No. 207. The sorting result is: tax No. 204 tax No. 205 tax No. 207 -----------------------------------

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.