Removing Blanks from a variable length string

A

AJCB

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
 
O

Ofer Cohen

With the use of the Replace function

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

To replace space with no space
 
A

AJCB

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
 
O

Ofer Cohen

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
 
A

AJCB

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
 
Top