在字符串中搜索子字符串? Access女士......

编程入门 行业动态 更新时间:2024-10-27 14:29:45
本文介绍了在字符串中搜索子字符串? Access女士......的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

问题: - 使用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女士......

本文发布于:2023-06-09 06:28:53,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/596853.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:字符串   女士   Access

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!