I’m looking for a function that would sort chars in varchar2 alphabetically.
Is there something built-in into oracle that I can use or I need to create custom in PL/SQL ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From an answer at http://forums.oracle.com/forums/thread.jspa?messageID=1791550 this might work, but don’t have 10g to test on…
In the example
colis defined in SQL*Plus, but if you make this a function you can pass it in, or could rework it to take a table column directly I suppose.I’d take that as a start point rather than a solution; the original question was about anagrams so it’s designed to find all permutations, so something similar but simplified might be possible. I suspect this doesn’t scale very well for large values.