bugl
bugl
HomeLearnPatternsPathsSearch
HomeLearnPatternsPathsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

MS Access Replace() Function

Flash cards

Review the key moves

1/4
Core idea

What is the main idea behind MS Access Replace() Function?

Lesson checks

Practice each idea before moving on

Short Mimo-style checks built from this lesson's code, terms, and sequence.

1Quick choice

Which statement best captures the main point of this lesson?

2Fill blank

Complete the missing token from the example code.

___ Replace("My name is Willy Wonka", "i", "a") AS ReplaceString;
3Order

Put the learning moves in the order that makes the concept easiest to apply.

Replace "i" with "a" in the string:
Definition and Usage
MS Access Replace() Function

Example

Replace "i" with "a" in the string:

SELECT Replace("My name is Willy Wonka", "i", "a") AS ReplaceString;

Definition and Usage

The Replace() function replaces a substring within a string, with another substring, a specified number of times.

Syntax

Replace(
string1
,
find
,
replacement
,
 start
,
 count
,
 compare
)

Parameter Values

ParameterDescription
string1Required. The original string
findRequired. The substring to search for in string1
replacementRequired. The substring to replace find in string1
startOptional. The start position in string1 to begin the search. If omitted, start is 1
countOptional. The number of replaces to perform. If omitted, it will replace all occurrences of find with replacement
compareOptional. The type of string comparison. Possible values: -1: Use the setting of Option Compare 0: Binary comparison 1: Textual comparison 2: Comparison based on info in your database

Technical Details

Works in:From Access 2000

Previous

MS Access Mid() Function

Next

MS Access Right() Function