In field NOME of Acces table i can have, see the txt attached.
The first value is the surname and second is the name.
Naturally from name and surname i need one only space
How to delete the "surplus" spcace from name and surname and maintain only one?
Naturally dont check if in the field are the surname and name with only one space.
REPLACE blank space in field.
-
- PlatinumLounger
- Posts: 4364
- Joined: 26 Apr 2010, 17:36
REPLACE blank space in field.
You do not have the required permissions to view the files attached to this post.
Last edited by sal21 on 06 Nov 2013, 07:47, edited 1 time in total.
-
- cheese lizard
- Posts: 6241
- Joined: 16 Jan 2010, 00:14
- Location: Sydney Australia
Re: REPLACE blank space in filed.
without having looked at your attachment, I think you're trying to get rid of "white spaces" which http://www.editpadpro.com/; an editor I've bought and used for decades, does exactly that in no time at all.
Cheers, Claude.
-
- PlatinumLounger
- Posts: 4364
- Joined: 26 Apr 2010, 17:36
Re: REPLACE blank space in filed.
but I refer my post on a field in Access table.Claude wrote:without having looked at your attachment, I think you're trying to get rid of "white spaces" which http://www.editpadpro.com/; an editor I've bought and used for decades, does exactly that in no time at all.
I have post a question in:
Portal » Board index ‹ Office Applications ‹ Access/SQL
-
- Administrator
- Posts: 78549
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: REPLACE blank space in field.
You can run an update query:
Code: Select all
UPDATE Test1 SET Nome = Replace(Replace(Replace([Nome]," "," *"),"* ",""),"*","");
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4364
- Joined: 26 Apr 2010, 17:36
Re: REPLACE blank space in field.
HansV wrote:You can run an update query:
Code: Select all
UPDATE Test1 SET Nome = Replace(Replace(Replace([Nome]," "," *"),"* ",""),"*","");
as usual your code work fine!
But instead to use a query, my real question is:
i get a string data with:
PRES = Trim(mid(MyString, 10, 50))
is possible to check if in PRES are present more of 2 space in data string, and delete the "surplus" space before to insert PReS in filed?
e
-
- Administrator
- Posts: 78549
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: REPLACE blank space in field.
You can use
Code: Select all
PRES = Replace(Replace(Replace(Trim(Mid(MyString, 10, 50))," "," *"),"* ",""),"*","")
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4364
- Joined: 26 Apr 2010, 17:36
Re: REPLACE blank space in field.
HansV wrote:You can use
Code: Select all
PRES = Replace(Replace(Replace(Trim(Mid(MyString, 10, 50))," "," *"),"* ",""),"*","")
no words!
work perfect.
Tks.