First error: line 1:164 no viable alternative at character '<EOF>' salesforce
来源:互联网 发布:东方网络收购 编辑:程序博客网 时间:2024/04/27 16:04
如果你在用字符串拼接sql的时候,用如下方式拼接。就会出出现如上错误。
SELECT User_lundbeck__c,New_Field_in_day_Lundbeck__c FROM KPI_Report_Lundbeck__c where RECORDTYPEID= \'01290000000gLBoAAM\' and KPI_Report_Month_lundbeck__c='+this.monthandyear;
解析出来的sql中如下(假如:this.monthandyser的值为2013-12、
KPI_Report_Month_lundbeck__c的类型为text
SELECT User_lundbeck__c,New_Field_in_day_Lundbeck__c FROM KPI_Report_Lundbeck__c where RECORDTYPEID= '01290000000gLBoAAM' and KPI_Report_Month_lundbeck__c=2013-12
你会发现 没有用‘’ 引起来。所以出现了如上错误
正确的写法如下:
SELECT User_lundbeck__c,New_Field_in_day_Lundbeck__c FROM KPI_Report_Lundbeck__c where RECORDTYPEID= \'01290000000gLBoAAM\' and KPI_Report_Month_lundbeck__c=\''+this.monthandyear+'\'';
补充在salesforce中,还有可以用这种方式
String str = 'select Id,Name from Account where Id = :strid';其中strid是一个字符串类型的变量。但是要避免出现以上错误。
0 0
- First error: line 1:164 no viable alternative at character '<EOF>' salesforce
- 【Sikuli】SyntaxError ( "no viable alternative at input '.... 解决
- 解决Error: junk at end of line, first unrecognized character is `@'
- Error: junk at end of line, first unrecognized character is `@'错误
- goldengate ERROR: No viable tables matched specification
- ERROR: No viable tables matched specification.
- ERROR: No viable tables matched specification
- "fatal: protocol error: bad line length character: No s"原因
- "fatal: protocol error: bad line length character: No s"原因
- "syntax error at EOF"
- MySql ERROR 1075 (42000) at line 1:...
- Oracle error 1403: java.sql.SQLException: ORA-01403: no data found ORA-06512: at line 1 has been det
- ERROR 1010 (HY000) at line 1: Error dropping database
- Jforum中搜索错误:jforum Cannot parse '': Encountered "EOF" at line 1, column 0.
- org.apache.lucene.queryParser.ParseException: Encountered "<EOF>" at line 1, column 0.
- org.apache.lucene.queryParser.ParseException: Encountered "<EOF>" at line 1, column 0.
- FAILED: ParseException line 1:12 missing TABLE at 'ext_emp' near '<EOF>'
- org.apache.lucene.queryparser.classic.ParseException: Encountered "<EOF>" at line 1, column 0.
- WordPress网站的Robots协议应该怎么写
- LeetCode Trapping Rain Water
- URI与XML命名空间
- 网站禁止百度转码
- C++ Unicode SBCS 函数对照表
- First error: line 1:164 no viable alternative at character '<EOF>' salesforce
- 百度快照更新与倒退的官方解释
- 软件工程
- android 最新源码按模块下载
- 黑马程序员_面试题心得
- 论HTML中相对URL的选取
- hbase安装
- latex 中文
- 织梦dede列表调用图集的第一张图片大图原图地址(非缩略图)