2 Replies Latest reply: Dec 4, 2013 9:19 AM by Ivan Troisi RSS

    Number format

    Ivan Troisi

      Hi All, I was trying to convert a value which is in text format to number.

       

      I have field '0000000000000000158,15' in text format. I need this field en number format.

       

      I try num ('0000000000000000158,15') but it isnt work.

       

      Thanks and best regards

       

      Ivan.

        • Re: Number format
          Henric Cronström

          There are too many digits. Try this instead:

               Evaluate(Subfield(Number,',',1)) + Evaluate('0.' & Subfield(Number,',',2)) as Number

           

          HIC

            • Re: Number format
              Ivan Troisi

              Try this instead but it isnt work.

              This worked when divided into two instead.

               

              I made.

               


              One:

              LOAD

                num( replace(ltrim(replace(Evaluate(Subfield(@180:209,',',1)),'0',' ',)),' ',0)) as NumberI,

                num(Evaluate('0.' & Subfield(@180:209,',',2))) as Number,

              FROM

              [C:\Documents and Settings\l0289531\Escritorio\Seg_of_8011-8012_20131126.txt]

              (fix, codepage is 1252);

               

               

              Two:

              LOAD

              NumberI + Number as SDO_ACDO

              Resident One