Andrew,

If you want the new field to be a number field, create a smallint or 
integer field and update it with:

val(right$(nameoforiginalIDfield,len(nameoforiginalIDfield)-4))

If you want the new field to be a character field, create it and update 
with:

right$(nameoforiginalIDfield,len(nameoforiginalIDfield)-4)

[substitute in the name of your field with the EH01wxyz value 
for "nameoforiginalIDfield"]

HTH,

Eric Johnson


> Dear All,
> 
> I have a very simple problem that I have been able to solve before 
but for some reason cant remember how I did it previously.
> 
> I have a table with approx 200 records. Each record in one of my 
columns has the prefix EHO1 then is followed by a four-digit number to 
differentiate each record from the rest.
> 
> What I want to do is create a new column (in the same table) with 
just those four final numbers from each record being displayed (ie: 
truncating the number so only the final 4 numbers are displayed)
> 
> I hope someone can help me with this.
> 
> Many thanks in advance,
> 
> Andrew Tracey
> Information Support Officer
> Corporate Information
> Corporate Development
> South Tyneside Council
> Westoe Road
> South Shields
> NE33 2RL
> 
> Tel: 0191 4247561
> E-Mail : [EMAIL PROTECTED]
> 
> 
************************************************************************
************************
> 
************************************************************************
************************
> Please do not print this e-mail if you can help it - and help protect 
the environment.
> 
************************************************************************
************************
> This email and any files transmitted with it are confidential and 
intended solely for the named recipient.  If you have received this e-
mail in error, please immediately notify the sender by e-mail and 
delete from your system, you are not permitted to disseminate, store, 
disclose or copy.  
> E-mail transmission cannot be guaranteed to be secure or error-free 
as they could be intercepted, corrupted, lost, destroyed, arrive late 
or incomplete, or contain viruses and therefore the Council accept no 
liability for any such errors or omissions.  
> Views or opinions expressed in this email are solely those of the 
author and do not necessarily represent those of the Council.
> South Tyneside Council, Town Hall & Civic Offices, Westoe Road, South 
Shields, Tyne & Wear, NE33 2RL, Tel: 0191 427 1717, Website: 
www.southtyneside.info 
> 
> 
************************************************************************
************************
> The Council's web site address is www.southtyneside.info
> 
> _______________________________________________
> MapInfo-L mailing list
> [email protected]
> http://www.directionsmag.com/mailman/listinfo/mapinfo-l
> 
> 

-- 
[EMAIL PROTECTED]
_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to