PC Review


Reply
Thread Tools Rate Thread

Changing the number of digits

 
 
=?Utf-8?B?aHVyc3R5?=
Guest
Posts: n/a
 
      5th Sep 2006
I have a table with a few thousand records. One of the columns is a
commodity code.
For example, a few of the entries are: 00608J, 02801C, 022034
I need only the first three numbers: 006, 028, 022
Is there any way by using either a table or query that I can chop these
numbers in down to only use the first three? I have tried a few things with
an input mask but nothing has worked.
 
Reply With Quote
 
 
 
 
John W. Vinson/MVP
Guest
Posts: n/a
 
      5th Sep 2006
"hursty" <(E-Mail Removed)> wrote in message
news:A8A5E8E3-5EE7-4062-932D-(E-Mail Removed)...
>I have a table with a few thousand records. One of the columns is a
> commodity code.
> For example, a few of the entries are: 00608J, 02801C, 022034
> I need only the first three numbers: 006, 028, 022
> Is there any way by using either a table or query that I can chop these
> numbers in down to only use the first three? I have tried a few things
> with
> an input mask but nothing has worked.


You can use a Query with a calculated field. Just type into a vacant Field
cell in the query grid:

FirstThree: Left([fieldname], 3)

This will not affect the data stored in your table, but will give you the
substring you want; it can be used for sorting, searching, or display.

John W. Vinson/MVP



 
Reply With Quote
 
=?Utf-8?B?aHVyc3R5?=
Guest
Posts: n/a
 
      6th Sep 2006

Thanks, that worked great.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA write macro change column with 3 number digits to 4 digits the James C Microsoft Excel Misc 3 25th Jan 2010 03:12 PM
number 12 digits to 15 digits mehdy-e Microsoft Excel Misc 5 13th Nov 2009 04:43 PM
How to customize number to 10 digits including 2 digits after deci =?Utf-8?B?Q2FyaW5h?= Microsoft Excel Worksheet Functions 3 20th Sep 2007 02:50 AM
Get a number with spcific number of digits after the point =?Utf-8?B?Tmlyb24ga2Fn?= Microsoft VC .NET 2 17th May 2006 05:07 PM
number changing digits on paste from web apx file field =?Utf-8?B?VG9kZCBGLg==?= Microsoft Excel Misc 0 15th Mar 2006 03:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:02 AM.