MapInfo Pro

Expand all | Collapse all

Sent from Snipping Tool

  • 1.  Sent from Snipping Tool

    Posted 09-22-2020 01:14

    Is there a way to search string for a blank and replace with data? If I leave the search box empty it does not work. Alternatively is ther a way to populate the attributes column in bulk rather than having to cut and paste each one individually.



  • 2.  RE: Sent from Snipping Tool

    Posted 09-22-2020 03:03
    Hi Jodi

    Are you looking for a way to only update the records where the column doesn't already hold a value?
    If you are, here are a few suggestions:

    In MapInfo Pro v2019, you can add a condition to your update statement for example using the new SQL Window. This lets you update specific records in a table determined by the condition.

    In you example, it would be:
    Update previous_ss_testing
    Set CHMP = "11635"
    Where CHMP = ""

    In earlier versions of MapInfo Pro, you would have to do this using two statements; first, use a Select statement to get the records to be updated into a query table, and then use the Update statement to update these records:
    Select * From previous_ss_testing
       Where CHMP = ""
       Into __TO__UPDATE NoSelect
    Update __TO__UPDATE 
       Set CHMP = "11635"

    It would be easiest to run these from the MapBasic window.

    Let me know if I have missed the point

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

  • 3.  RE: Sent from Snipping Tool

    Posted 09-22-2020 19:19

    Thanks Peter, That worked.




  • 4.  RE: Sent from Snipping Tool

    Posted 09-24-2020 00:42
    Is there a way to add consecutive numbers and/or letters to a column?

    Jodi Turnbull

  • 5.  RE: Sent from Snipping Tool

    Posted 09-24-2020 01:39
    Hi Jodi,

    For numbers you can use the RowID function:

    Update TestTable Set ID = RowID

    For letters, you can combine this with the CHR$ function, where CHR$(65) represents the letter 'A':

    Update TestTable Set ID = CHR$(64+RowID)

    Of course, this is only valid for the first 26 records.

    James Nolet
    Dooley Mitchell & Morrison Pty Ltd
    Mentone, VIC, Australia

  • 6.  RE: Sent from Snipping Tool

    Posted 09-24-2020 03:08

    Thanks, that worked a treat.



    Jodi Turnbull

    Ochre Imprints Pty Ltd

    331 Johnston Street, Abbotsford VIC 3067

    PO Box 280, Clifton Hill VIC 3068

    ph: (03) 9417 6094    mob: 0417019255

    In Office Mon-Tues-Wed.

    logo final