MS Access แทนที่ ()ฟังก์ชั่น
ตัวอย่าง
แทนที่ "i" ด้วย "a" ในสตริง:
SELECT Replace("My name is Willy Wonka", "i", "a") AS ReplaceString;
ความหมายและการใช้งาน
ฟังก์ชัน Replace() แทนที่สตริงย่อยภายในสตริงด้วยสตริงย่อยอื่น ตามจำนวนที่ระบุ
ไวยากรณ์
Replace(string1, find, replacement,
start,
count,
compare)
ค่าพารามิเตอร์
Parameter | Description |
---|---|
string1 | Required. The original string |
find | Required. The substring to search for in string1 |
replacement | Required. The substring to replace find in string1 |
start | Optional. The start position in string1 to begin the search. If omitted, start is 1 |
count | Optional. The number of replaces to perform. If omitted, it will replace all occurrences of find with replacement |
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 info in your database |
รายละเอียดทางเทคนิค
ทำงานใน: | จากการเข้าถึง 2000 |
---|