Vinesh,
If your column is a number field rather than a character field you can
expand on Mike's idea by including the Str$() function.
eg
update mytable set newcol = left$(str$(id_number),2)
Alternatively if you are sure the id_number is always 10 digits you can use
the INT function and divide the original value by 100,000,000 ie shift the
decimal 8 points to the left.
eg
update mytable set newcol = int(id_number/100000000)
cheers
Martin
==================================
Martin Roundill
GIS Manager
Waitakere City Council
Private Bag 93109
Henderson
Waitakere City
New Zealand
-----Original Message-----
From: Michael Jenne [mailto:[EMAIL PROTECTED]]
Sent: Sunday, 5 March 2000 04:50
To: Govind, Vinesh; '[EMAIL PROTECTED]'
Subject: Re: MI Truncating a column to display only the first two
numbers
Vinesh,
Assuming that the ID_Number column consists of characters (not an integer,
float, etc.) then you can create a new column, and then update the new
column with Left$(ID_Number,2).
Mike Jenne
At 03:22 PM 3/4/00 +0200, Govind, Vinesh wrote:
>Dear Sir
>
>I have a table with a column called ID_number that consists of ten digits
>for each individual. I would like to truncate this column to create a new
>column that will only display the first two digits of the ID_number. This
>will allow me to calculate the clients current age.
>Please assist.
>
>Thanking you.
>
>Kind regards.
>
>
>Vinesh Govind
>
>
>NBS - Marketing
>(T) 364 2106
>(F) 364 2915
>Email: [EMAIL PROTECTED]
>
>
>
>WARNING:
>Any unauthorised use or interception of this email is illegal. If this
email
>is not intended for you, you may not copy, distribute nor disclose the
>contents to anyone. Save for bona fide company matters, the BoE Group does
>not accept any responsibility for the opinions expressed in this email.
>For further details please see: http://www.nbs.co.za/emaildisclaim.htm
>
>
>
>
>
----------------------------------------------------------------------
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]