Select the right 4 digits from a colum

MariaTrivino

New member
Local time
Today, 01:15
Joined
May 16, 2008
Messages
2
Hello, I'm new in this forum and I hope someone can help me.:D
I've got a database with 600,000 records. One of the columns has got mixed values (7 digits or 4 digits). I would like to have a 4 digits column selecting only the 4 digits (starting from the right side). I tried using a Design Query, SQL view, then SELECT............. FROM Tblcitas_fauna; However I don't know how to write that specific code to select those 4 digits.
Thanks in advance and I hope this was not very confusing

Maria
 
Hi Ken,

Thanks a lot!! It has worked perfectly. I'm glad I joined this forum as I spent quite a lot of time trying to find the solution by myself without success :(
 
Maria

Read through what you are looking for but have a question about it. Are you looking for the right 4 numbers of all of the cells, or just cells where there are only 4 numbers?

From what Ken has, that will return the right 4 digits of all cells. If you are looking for only cells that have only 4 numbers try using

where len([MyFieldName])=4

I'm new to this as well, but thought I would throw in my 2 cents.
 

Users who are viewing this thread

Back
Top Bottom