Create a column in MapInfo via Table>Maintenance>Table Structure
Then use Update Column.
Update the new column with the value of the old column with the
following expression

Mid$(LTrim$(OldCol),InStr(1,LTrim$(OldCol),"
")+1,Len(OldCol)-InStr(1,LTrim$(OldCol)))

Or Just Mid$(LTrim$(OldCol),InStr(1,LTrim$(OldCol)," ")+1,50)

Mid$() extracts chars from a given location for a given number of characters
The first parameter is what field you are searching on
The second field is where to extract from
The third parameter is how many chars to extract

As you can see I am extracting from the old column
I am extracting from the location of the char after the 1st instance of a space.
Note that I assume your address numbers and street are separated by a space.
Also note that I use a LTrim$() to ensure that there are no preceding spaces.
The third parameter I get the length of the original col and extract
it from the num of chars I had taken away.

I'd probably use my second alternative as it is less complex =)  Just
replace the 50 with the length you have set your char column =)

Hmmm.. I did not test it out but it sounds correct theoretically. Let
me know if the above was of assistance.

- Steve Chan
On Mon, 7 Feb 2005 17:23:47 -0600, Alan Gunn
<[EMAIL PROTECTED]> wrote:
> Hello all,
> 
> I would like to make a column that is the second half of another column.
> For example, I would like to remove the number part of an address field,
> to make a column that is just the street name. So what's the easy way to
> do this off the tops of your heads?
> 
> Thanks,
> 
> Alan
> 
>

---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 15152

Reply via email to