View Full Version : Update Query and ignore spaces


Luddite Lad
06-14-2008, 03:16 AM
I have an update query that creates a reference.

part of the update is the following code

(Left([clientname],Len([clientname])-(Len([clientname])-3)))

Which works fine. What I'm wondering is if there is a way to ignore any spaces that might be in the first three characters. So in other words simply pick up the first three alpha numerics?

doco
06-14-2008, 05:45 AM
Try clientname = Replace( clientname, " ", "" )

Then Left( clientname, 3 )

Luddite Lad
06-14-2008, 10:05 AM
Just what I was looking for, thanks :)

I used
(Left(Replace([clientname]," ",""),3))

doco
06-14-2008, 11:13 AM
Just what I was looking for, thanks :)

I used
(Left(Replace([clientname]," ",""),3))

Yup - that'll work :)

Glade to be of service