ADO.Net中的查询内置器 [英] Query Builter in ADO.Net
问题描述
大家好,
我正在尝试在查询"构建器中添加Query for LIKE,而我的代码就像
选择姓名,姓氏,地址,帐号FROM FROMsheet1
哪里喜欢@name%
但是显示错误.
哪里查询,
选择姓名,姓氏,地址,帐号FROM FROMsheet1
名称= @名称
成功运行.
请给我一些建议,以通过查询生成器运行LIKE函数查询.
我在名称"列中的数据例如阿米(Amit Chaoudhari)"
如果我搜索"Ami",则应该显示"Amit Chaoudhari"的覆盖面
谢谢,
Mayur
Hi All,
I am trying to adding the Query for LIKE in Query builder and my code is like
SELECT name, surname, address, Account no FROM sheet1
WHERE name LIKE @name%
But its showing error.
Where the Query,
SELECT name, surname, address, Account no FROM sheet1
WHERE name = @name
Works successfully.
Please can you give me suggestions to run the LIKE function query through query builder.
My data in name column is like e.g. "Amit Chaoudhari"
If i search for "Ami" it should show the reach for "Amit Chaoudhari"
Thanks,
Mayur
推荐答案
Mayur .... U应该将查询按以下方式进行修饰:.
Mayur....U should Chmage the query as..
SELECT name, surname, address, Account no FROM sheet1
WHERE name LIKE @name+'%'
它的工作原理是.....精..
it works.....fine..
这篇关于ADO.Net中的查询内置器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!