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

Home -> Community -> Usenet -> c.d.o.misc -> Re: software version number datatype

Re: software version number datatype

From: <JimStrehlow_at_data911.com>
Date: 26 Apr 2005 17:19:20 -0700
Message-ID: <1114561160.088288.205040@z14g2000cwz.googlegroups.com>


Best practice for now is to store four separate number values and compare.

blnCondition := false;
IF majorNum > testMajorNum THEN

  blnCondition := true;
ELSIF (majorNum = testMajorNum) and (minorNum > testMinorNum) THEN
  blnCondition := true;
ELSIF (majorNum = testMajorNum) and (minorNum = testMinorNum) and

(patchNum > testPatchNum) THEN

  blnCondition := true;
ELSIF (majorNum = testMajorNum) and (minorNum = testMinorNum) and
(patchNum = testPatchNum)
                                and (revisionNum >= testRevisionNum)
THEN
  blnCondition := true;
ELSE
  blnCondition := false;
END IF; I noticed that more applications other than version number were specially grouping numbers.
The above series of IF statements could be accomplished by one simple compare if a new data type that could parse better existed. Received on Tue Apr 26 2005 - 19:19:20 CDT

Original text of this message

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