-1

此请求按预期工作:

select dit_in.id data_item_in, dit_out.id data_item_out, alg.id algo_id 

from algorithm_run arun

join algorithm_run_of arof on
arof.algorithm_run_id = arun.id

join algorithm_run_input arin on
arin.algorithm_run_id = arun.id

join data_item dit_in on
dit_in.id = arin.data_item_id

join algorithm alg on
alg.id = arof.algorithm_id

join algorithm_run_output arout on
arout.algorithm_run_id = arun.id

join data_item dit_out on
dit_out.id = arout.data_item_id

where alg.id in (182,183,143,162,125,222)

不幸的是,当我在最后添加时出现错误:

 and arun.start_time >= to_date(’01/jun/2011’,’dd/mm/yyyy’) 
 and arun.start_time < to_date(’01/jul/2011’,’dd/mm/yyyy') 

我正在使用网络界面,错误消息是:

警告:oci_execute() [function.oci-execute]:ORA-00911:第 117 行 /opt/csw/apache2/share/htdocs/DAE/sites/default/modules/data_repository/data_repository.inc 中的字符无效。

警告:oci_fetch_row() [function.oci-fetch-row]:ORA-24374:在/opt/csw/apache2/share/htdocs/DAE/sites/default/modules/daedatabase/中获取或执行和获取之前定义未完成daedatabase_db.inc 在第 852 行。

4

3 回答 3

5

试试这个:

 and arun.start_time >= to_date(’01/06/2011’,’dd/mm/yyyy’) 
 and arun.start_time < to_date(’01/07/2011’,’dd/mm/yyyy’) 

或者

 and arun.start_time >= to_date(’01/jun/2011’,’dd/mon/yyyy’) 
 and arun.start_time < to_date(’01/jul/2011’,’dd/mon/yyyy’) 

问题是您的日期字符串 (01/jun/2011) 与格式说明符 (dd/mm/yyyy) 不匹配。如上例所示,您需要更改日期或说明符。

于 2011-10-23T02:51:24.463 回答
5
and arun.start_time < to_date(’01/jul/2011’,’dd/mm/yyyy') 

我是否在最后一位周围看到两种不同类型的引号字符?单引号和反引号?或者这只是一个剪切/粘贴或翻译问题?

于 2011-10-23T13:47:07.670 回答
3
于 2011-10-23T15:33:00.177 回答