Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 21st, 2004, 12:48 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default Character replace function?

Before I spend time writing a function to replace a certain character in a string, does Access have a built in function, which I could pass a string, a character to replace, and the replacement character and get the modified string returned?

Thanks

Mike
EchoVue.com
__________________
Mike
EchoVue.com
 
Old December 21st, 2004, 01:47 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

If you had to replace an "_" or any type of character
see the replace function...

in an update sql statement you could ...

Replace([FieldName, "_", "")

this will replace the _ with nothing

or use the find/replace option in access

Jaime E. Maccou
 
Old December 21st, 2004, 01:53 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Thanks!

The replace function should work nicely. I am having a problem with double quotes appearing in data that I am inserting using an SQL INSERT function. By parsing the string through Replace with, switching " with ', it should solve the problem.

Thanks again

Mike
EchoVue.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
XSLT replace for character entities atulshin XSLT 1 November 1st, 2008 05:19 AM
Replace character gregalb SQL Server 2000 6 July 12th, 2007 01:14 AM
SQL REPLACE after a character. Stuart Stalker SQL Server 2000 6 April 11th, 2006 02:13 PM
Replace Character " fosca XSLT 1 November 11th, 2004 04:14 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.