removing spaces from within strings

  • Thread starter Thread starter Alex
  • Start date Start date
Hi

Is there a query i can run which will remove any spaces from within a field?

thanks

All spaces "I am a nice guy" to "Iamaniceguy"

NewString:Replace([FieldName]," ","")
 
Alex said:
Is there a query i can run which will remove any spaces from within a field?


Use the Replace function:

If the value is not editable, just use it in a Select query:
SELECT this, that, Replace(other, " ","")
FROM thetable

If you want to permantly change all the records in a table,
use it in in an Update query:

UPDATE thetable SET other = Replace(other, " ","")
 
Back
Top