PDA

View Full Version : Solved: Update query to delete unwanted (non-numeric) characters



hunsnowboard
04-12-2009, 01:55 AM
Hi there Everyone! I need to create a database from a a txt file. When I imported it I got some records where there are letters space characters and numbers as well. These look like this (the dots show the spaces):
NÉ..........979318
R................1724396
NNA.....7800

I would like to create an update query which deletes the non-numeric characters from these records/rows, but I do not know how to do it..:( What formula to apply... Please help if you can!

OBP
04-12-2009, 03:17 AM
You can use the Replace formula, but you may have to run the query a number of times.
See the attached database that replaces ":" with "/" in dtaes for the principle of how it works.
I would suggest using
Replace([data],' ','')
and run it lots of times or
Replace([data],' ','')
for those with large spaces and reduce the first part by 1 space at a time.

hunsnowboard
04-13-2009, 12:52 AM
Thank you for your reply, however I found a better solution!

http://support.microsoft.com/kb/210537

Thank you!