MS Access InStr() လုပ်ဆောင်ချက်
ဥပမာ
string "ဖောက်သည်" တွင် "t" ကိုရှာပြီး ရာထူးပြန်ပေးသည်-
SELECT InStr("Customer", "t") AS MatchPosition;
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
InStr() function သည် အခြား string တစ်ခု၏ ပထမဆုံး ဖြစ်ပေါ်မှု အနေအထားကို ရရှိသည်။
ဤလုပ်ဆောင်ချက်သည် အသေးစိပ်မပါသော ရှာဖွေမှုကို လုပ်ဆောင်သည်။
အထားအသို
InStr(start, string1, string2,
compare)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
start | Optional. The start position for the search. Position 1 is default |
string1 | Required. The string to be searched |
string2 | Required. The string to search for |
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 |
တန်ဖိုးများ ပြန်ပေးသည်။
- string1 တွင် string2 ကိုမတွေ့ပါက၊ ဤလုပ်ဆောင်ချက်သည် 0 သို့ပြန်သွားမည်ဖြစ်သည်။
- string1 သည် သုညအလျားဖြစ်ပါက၊ ဤလုပ်ဆောင်ချက်သည် 0 ကို ပြန်ပေးသည်။
- string1 သည် null ဖြစ်ပါက၊ ဤ function သည် null ဖြစ်သွားသည်။
- string2 သည် သုညအလျားဖြစ်ပါက၊ ဤလုပ်ဆောင်ချက်သည် start parameter မှတန်ဖိုးကို ပြန်ပေးသည်။
- start သည် string2 ၏ အရှည်ထက် > ဖြစ်ပါက၊ ဤ function သည် 0 ကို ပြန်ပေးသည်။
နည်းပညာဆိုင်ရာအသေးစိတ်
အလုပ်လုပ်သည်- | Access 2000 မှ |
---|