Rune,
Create new Integer type column to store results.
Copy the following lines into mapbasic window:
Update <MyTable> Set <NewCol> =
Val(Right$(<OldCol>,Len(<OldCol>)-
InStr(InStr(1,<OldCol>," ")+1,<OldCol>," "))) -
Val(M<OldCol>$(<OldCol>, InStr(1,<OldCol>," ")+1,
InStr(InStr(1,<OldCol>," ")+1,<OldCol>," ")-InStr(1,<OldCol>," ")))
Replace <MyTable> with your table name,
<OldCol> with your column name where your data is stored,
<NewCol> with column name you want results to be stored
Select entire text and hit Enter.
Regards,
Anssi
At 14:56 8.4.1999 +0000, you wrote:
>I have a littel problem (but you may have the solution..? :)
>In my table I have this info in one of my columns;
>
> 1 1573 1688
> 1 1688 1834
> 1 1834 2077
> 12 1390 1573
>etc.
>
>The first number is just a "roadnumber"
>.....but the second is from meter and the third is to meter.
>I want to make a query witch takes the last/third value minus the second,
>because my boss wants to know the distance.
>If it's possible I want to be able to store the result in a new column.
>
>Tanx
>Rune
>
>
>----------------------------------------------------------------------
>To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
>"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
>
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]