MapInfo Pro

 View Only
  • 1.  Changing column type from number to varchar from Oracle in MBX

    Posted 08-19-2022 13:57
    We have a very large data-set in GE smallworld which catalogues our entire network inventory.  From the beginning, every single object has been given a unique numerical ID.  Over the years these ID's for new objects has grown incredibly large such as 1456670843142318470 (This is a real ID as a number).  This gives us no issues while working in the smallworld platform, the problem is when we export all our data to MapInfo Tab files so we can analysis the data, make maps etc.  Because the ID is so large, and the column is a numerical format, when we export the data using Oracle, ID's this large are represented in the browser as a scientific notation, rendering them completely useless.

    We have an MBX code that we use to export the data into tab files and divided up by each of our markets.  We would like to know what needs to be added or altered to our code to change this column from number to varchar, rendering this a character column instead of a numeric value column should fix this issue.

    Thanks in advance :)
    Ryan






    ------------------------------
    Ryan Richter
    COX COMMUNICATIONS
    Roanoke GA
    ------------------------------


  • 2.  RE: Changing column type from number to varchar from Oracle in MBX

    Employee
    Posted 08-22-2022 03:11
    Hi Ryan

    I just tried creating a table with a LargeInto and inserted the number you shared above.

    It seems that the number does show nicely in the browser window at least.

    What column type does MapInfo Pro load the values into from the database? Float, Decimal, or LargeInt
    I'd guess Float.

    I tried adding some additional column types and can see that float is using the scientific notation

    Can you try to change the column type to LargeInt?

    You can also add a character column of a given width. I have used Char(30).
    To update this with the value, I'd suggest using FormatNumber$(ID).

    This will keep the number formatting to make it easier to read those big numbers.

    ------------------------------
    Peter Horsbøll Møller
    Principal Presales Consultant | Distinguished Engineer
    Precisely | Trust in Data
    ------------------------------



  • 3.  RE: Changing column type from number to varchar from Oracle in MBX

    Posted 08-22-2022 12:03
    Thanks Peter as always.
    When the data come from Oracle into MapInfo, the column is now a float, which I think explains the scientific notation.  I will forward this info onto our smallworld tech who handles the export, I am sure I will have more questions afterwards.  Thanks so much!
    Ryan

    ------------------------------
    Ryan Richter
    COX COMMUNICATIONS
    Roanoke GA
    ------------------------------