Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL question - Sorting by release/version numbers.

Re: SQL question - Sorting by release/version numbers.

From: Arjan van Bentem <avbentem_at_DONT-YOU-DARE-cable.a2000.nl>
Date: 1998/07/17
Message-ID: <6olu9c$hhh$1@newton.a2000.nl>#1/1

>n.n.nn.n... etc.
>example 7.3.4 which is less than 7.3.4.1

The nn is a little problem. If it was n.n.n.n then you could use translate to get rid of the dots:

    order by translate( my_version, '#.', '#' )

The # is needed as the third parameter can not be null. Effectively, # will be replaced by # (no change), the dot will be replaced with nothing and everything else will not change at all. So, 1.2.3.4 gets translated to 1234, but 1.23.4 also becomes 1234... I am not sure what your ordering rules for the betas are?

Arjan. Received on Fri Jul 17 1998 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US