Thanks for the reply. This is essentially what my regexp does, except you added a DISTINCT to get rid of the duplicates. I appreciate seeing another way to do this, but performance wise, it's just as bad as the regexp version. I guess what I need is a query that won't create duplicates to begin...
I have an old ugly system table that I need to normalize. It contains a pipe delimited part numbers list in one field and a corresponding node in another column.
Here is an example:
CREATE TABLE lookup(
part_number VARCHAR2(100),
node NUMBER
);
INSERT
INTO lookup(part_number...
I'm trying to write a string permutation function, and I want to include all combinations of the letters ranging from 1 to n in size. I got this to work, but it includes duplicates:
function permutate(permutation, addendum) {
if (addendum.length == 0) {
console.log(permutation);
return;
}...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.