问题: - 使用Ms Access命令行搜索字符串中的子字符串... exp: - i有一个诸如门后有一只猫这样的行 i希望从给定的行中获得背后字...... Ms访问数据库: - 给予 告诉 落后 rat ............................................ .... 基本上我想搜索长字符串中的子字符串... textbox包含该字符串... - ------------------------------ thnxs提前
Question:-Search substring in a string using Ms Access Command line ... exp:- i have a line such as "There is a cat behind door" i want to get "Behind" Word from the given line ... Ms Access Database:- Give Told Behind rat ................................................ basically i want to search a substring in a long string ... textbox contain that string ... ------------------------------- thnxs in advance
推荐答案这很复杂,但是...... This is complicated, but... SELECT * FROM MyTable WHERE INSTR('There is a cat behind door', ' ' + UName + ' ') <> 0
会这样做。 复杂的是它赢了;在字符串的开头找到它们,或者最后,它不适用于标点符号等等:我留给你的那些! 就个人而言,我不会尝试在SQL:我使用一种正确的语言,具有更好的字符串处理和表示能力,比如C#甚至VB。
Will do it. The complications are that it won;t find them at the beginning of the string, or the end, it doesn't work with punctuation, and so forth: those I leave to you! Personally, I wouldn't try to do it in SQL: I'd use a "proper" language with better string handling and presentation abilities, like C# or even VB.
更多推荐
在字符串中搜索子字符串? Access女士......
发布评论