急!sql语句缺失右括号
sql.append("selectID,title,lxrcard,spname,spmu,flow_type,rownumfrom"+tableName+"where...
sql.append("select ID,title,lxrcard,spname,spmu,flow_type,rownum from "+tableName+" where org_id="+ ORG_ID +"CRE_USERID='"+curUserId+"lxrcard in(select applicantid from WSSP_SINCERITYSTATE where sinceritystate=0)");
展开
1个回答
展开全部
select ID,title,lxrcard,spname,spmu,flow_type,rownum from "+tableName+"
where org_id='"+ ORG_ID +"' and CRE_USERID='"+curUserId+"' and lxrcard in(select applicantid from WSSP_SINCERITYSTATE where sinceritystate=0)
少了一个'。
其实比较好的方式是用string.Format来拼接sql语句,如:
string sql=string.Format(@"select * from {0} where name='{1}'", tableName, name);
where org_id='"+ ORG_ID +"' and CRE_USERID='"+curUserId+"' and lxrcard in(select applicantid from WSSP_SINCERITYSTATE where sinceritystate=0)
少了一个'。
其实比较好的方式是用string.Format来拼接sql语句,如:
string sql=string.Format(@"select * from {0} where name='{1}'", tableName, name);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询