Substitute occurrences of “i” with “a” in the string.
SELECT Replace(“My name is Willy Wonka”, “i”, “a”) AS ReplaceString; |
The Replace() function substitutes occurrences of a substring within a string with another substring, optionally limiting the number of replacements.
Replace(string1, find, replacement, start, count, compare) |
Parameter |
Description |
string1 |
Please provide the original string that you would like me to rephrase. |
find |
Mandatory. The substring to be searched within |
replacement |
Necessary. The substring to replace |
start |
If not provided, the search in string1 begins at position 1. |
count |
If not specified, all occurrences of find will be replaced with replacement in string1. |
compare |
Optional. The type of string comparison: Possible values: -1: Use the setting of Option Compare 0: Binary comparison 1: Textual comparison 2: Comparison based on information in your database |
Works in: |
From Access 2000 |