Removing Blanks from a variable length string

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi.
I have a problem which I am hoping someone will be able to help me with?
I have a text field which is variable length and could have anything in it.

Example: Baileys 190g Black

What I want it to say is:

Example: Baileys190gBlack

Is this possible?

Cheers
AJ
 
With the use of the Replace function

Replace([FieldName]," ","")

To replace space with no space
 
Would I do this in an update query?

Ofer Cohen said:
With the use of the Replace function

Replace([FieldName]," ","")

To replace space with no space

--
Good Luck
BS"D


AJCB said:
Hi.
I have a problem which I am hoping someone will be able to help me with?
I have a text field which is variable length and could have anything in it.

Example: Baileys 190g Black

What I want it to say is:

Example: Baileys190gBlack

Is this possible?

Cheers
AJ
 
If you want to update the table.
You can get the same resault without changing the value in the table with
using Select query

In the select query you can put the formula as a new field

Or, as SQL:
Select TableName.*, Replace([FieldName]," ","") As NewFieldName From TableName

if you want to update the table then BackUp your data first, just incase you
want to recover your data

Update TableName Set FieldName = Replace([FieldName]," ","")

--
Good Luck
BS"D


AJCB said:
Would I do this in an update query?

Ofer Cohen said:
With the use of the Replace function

Replace([FieldName]," ","")

To replace space with no space

--
Good Luck
BS"D


AJCB said:
Hi.
I have a problem which I am hoping someone will be able to help me with?
I have a text field which is variable length and could have anything in it.

Example: Baileys 190g Black

What I want it to say is:

Example: Baileys190gBlack

Is this possible?

Cheers
AJ
 
Brilliant. This worked a treat.. Cheers

Ofer Cohen said:
If you want to update the table.
You can get the same resault without changing the value in the table with
using Select query

In the select query you can put the formula as a new field

Or, as SQL:
Select TableName.*, Replace([FieldName]," ","") As NewFieldName From TableName

if you want to update the table then BackUp your data first, just incase you
want to recover your data

Update TableName Set FieldName = Replace([FieldName]," ","")

--
Good Luck
BS"D


AJCB said:
Would I do this in an update query?

Ofer Cohen said:
With the use of the Replace function

Replace([FieldName]," ","")

To replace space with no space

--
Good Luck
BS"D


:

Hi.
I have a problem which I am hoping someone will be able to help me with?
I have a text field which is variable length and could have anything in it.

Example: Baileys 190g Black

What I want it to say is:

Example: Baileys190gBlack

Is this possible?

Cheers
AJ
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top