select语句的语法错误 [英] Syntax error of select statement

查看:190
本文介绍了select语句的语法错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

。打开(选择*来自tbllocation,其中ID如tblclient2,如NUMBER,expiration ='&Label4.Text&'和status ='¬ expired&',cn,2,3)

.Open("select * from tbllocation where ID like tblclient2 like NUMBER where expiration = '" & Label4.Text & "' and status = '" & "not expired" & "'", cn, 2, 3)

推荐答案

你已经包含2个where子句,只允许1个



应该是



从tbllocation中选择*,其中ID如tblclient2,如NUMBER或expiration ='&Label4.Text&'和status ='¬ expired&'







从tbllocation中选择*,其中ID如tblclient2,如NUMBER和expiration ='&Label4.Text &'和status ='¬ expired&'
You have included 2 where clauses, only 1 is allowed

Should be

select * from tbllocation where ID like tblclient2 like NUMBER or expiration = '" & Label4.Text & "' and status = '" & "not expired" & "'"

or

select * from tbllocation where ID like tblclient2 like NUMBER and expiration = '" & Label4.Text & "' and status = '" & "not expired" & "'"


这是查询语法,请根据您的要求添加列名称和值。



Here is Query Syntax please add your columns name and values according to your requirements.

select * from tbllocation where ID like '%GIVE ANY ID HERE%' --PLEASE USE [AND OR] HERE 
OR tblclient2 like '%GIVE NUMBER HERE%' 
AND expiration = 'YOUR TEXT HERE' and status = 'not expired'





如有任何问题请告诉我。



谢谢



if any issue then please let me know.

Thanks


这篇关于select语句的语法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆