Re: how do i split a string

From: Maxim Demenko <>
Date: Sat, 18 Oct 2008 20:02:28 +0200
Message-ID: <>

Bob Jones schrieb:
> "Maxim Demenko" <> wrote in message

>> Bob Jones schrieb:
>>> Ok, I just wasn't sure why you were providing an alternative solution to 
>>> a different problem.
>> You see - to find *all* occurences of repeated characters within given 
>> string (meant - to find corresponding position and length) in my opinion 
>> is not much different, it is just a more general case of what was asked - 
>> to find *first two* occurences. Do you think, it isn't worth to look for 
>> alternative solutions for more general classes of problems, if a solution 
>> for a particular case is known?

> I am all for alternative or better solutions, but you can't call it an
> alternative if it returns a different result.
> This result is not the same as "3263" that OP was looking for.
> 3 2
> 6 3
> 12 6
> 20 2
> Now you can probably write something does a lot more, but whether you need
> it is the question.

If you look again on original topic, you may probably notice, that the question was to find 1st and 2nd occurence, and "3263" was just an example of required output. I took the freedom to provide an alternative   solution to question and disregard the example just because (again, in my opinion) that example wasn't very suitable - if either length or position is greater than 9, output becomes ambiguous. On the other side, there are a lot of well known string aggregation techniques in oracle, which you probably are aware of, so, if OP (or someone else) insist on that exact output format - it is matter of some (few) additional lines of code to get it Now, i hope answered your questions in context of this thread, and as we   start to be more and more offtopic, i assume, we can safely finish this discussion.

Best regards

Maxim Received on Sat Oct 18 2008 - 13:02:28 CDT

Original text of this message