从表中的值开始按后三个字母的第一个字母进行拟合 [英] Fitering values from table by first letter of last three letters
问题描述
嗨
在一个表中,我有类似的值,
Hi
in a table I have the Values like,
123568
568123
156823
745568
568424
156842
115684
我想按后三个字母的第一个字母过滤值.
例如
如果我键入5,则在文本框中显示"745568".
如果我键入8则表示必须显示156823,156842..
如果我使用
I want to filter the values by first letter of last three letters.
for an example
in a text box if i type 5 only "745568" should be displayed.
if I type 8 means 156823,156842has to be displayed..
if I use
select num from numbers where num like ''%568%''
.它给出期望的结果(按最后三个字母过滤).但必须输入一个或两个字母来获取值.
请解决这个问题.
预先表示感谢.
. It gives the desired result(filtering by last three letters). but have to get the values with one or two letters are entered.
Plz resolve this.
Thanks in advance.
推荐答案
Uou可以使用正则表达式,如^ ].
Uou can use regular expressions as explained here[^].
这可以通过多种方式完成.一个版本:
This can be done in several ways. One version:
... where field like '%5__'
有关LIKE的更多信息,请参见: http://msdn.microsoft.com/en-us/library/ms179859.aspx [^ ]
For more info about LIKE, see: http://msdn.microsoft.com/en-us/library/ms179859.aspx[^]
这篇关于从表中的值开始按后三个字母的第一个字母进行拟合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!