如何在sqlite中使用Wild卡 [英] how Wild card are used in sqlite
本文介绍了如何在sqlite中使用Wild卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下查询未正确使用sqlite天气与sql它工作正常我使用的是vb.net
com.CommandText = SELECT MAX(DocumentCode)AS DocumentCode FROM DocumentsHeader WHERE(DocumentCode LIKE @DocumentCode +'%');
com.Parameters。添加( @ DocumentCode,SqlDbType。 NVarChar )。Value = Passvalue.ToString()。Trim();
returnvalue = com.ExecuteScalar();
解决方案
请参阅这篇好文章,http://www.techonthenet.com/sqlite/like.php [ ^ ]
您可能需要在DOcumentCode周围使用单引号。什么数据类型是DocumentCode? blockquote>
这个问题是 sqlite查询语法错误与like运算符 [ ^ ]。请不要多次发布同一个问题。
This below query is not correctly working with sqlite weather with sql it works fine i am using vb.net
com.CommandText = "SELECT MAX(DocumentCode) AS DocumentCode FROM DocumentsHeader WHERE (DocumentCode LIKE @DocumentCode + '%')"; com.Parameters.Add("@DocumentCode", SqlDbType.NVarChar).Value = Passvalue.ToString().Trim(); returnvalue = com.ExecuteScalar();解决方案Refer to this good article, http://www.techonthenet.com/sqlite/like.php[^]
It may be that you need single quotes around your DOcumentCode. What datatype is DocumentCode?
This question is a duplicate of sqlite query syntax error with like operator[^]. Please do not post the same question more than once.
这篇关于如何在sqlite中使用Wild卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文