Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find and Replace Specific Strings

Status
Not open for further replies.

HenryAnthony

Technical User
Feb 14, 2001
358
US
Hi and Happy Holidays to All!

In a certain field in a table, I need to search for certain characters such as spaces and punctuation and replace them either with nothing or with other special characters.

I then need to search all fields for "'" and replace with "\q".

Currently, I do this manually but am looking for some code that would eliminate this step.

Any help would bring you my adulation and stars!

Best regards,

Henr¥
 
You can use the Replace function.
REPLACE
Replaces part of a text string with a different text string.

Syntax

REPLACE(old_text,start_num,num_chars,new_text)

Old_text is text in which you want to replace some characters.

Start_num is the position of the character in Old_text that you want to replace with New_text.

Num_chars is the number of characters in Old_text that you want to replace.

New_text is the text that will replace characters in Old_text.
--------------
A little knowledge is a dangerous thing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top