select *
from (select a.deviceid,
f.ZWCM,
h.BWMC PORTNAME,
t.cbbh,
'正常' XINHAO,
a.gpstime,
'进港' state,
t.ywbh,
f.cbzldm,
to_char(t.czsj, 'yyyy-mm-dd hh24:mi:ss') time
from zxdb.DTYW_QZCY_JGORCG_SS t,
zxdb.DTYW_CBJBXX f,
zxdb.DTXT_BW h,
gps.gpsinfo a,
gps.boatinfo b
where t.cbbh = f.cbbh(+)
and t.bwdm = h.bwdm(+)
and f.zwcm = b.boatname(+)
and b.id = a.deviceid(+)
and t.jg_cg = 'j'
and t.czsj between to_date('2011-12-07 16', 'yyyy-mm-dd hh24') and
to_date('2011-12-08 16', 'yyyy-mm-dd hh24')) c
运行没有问题
在最外面加上
where trunc((sysdate - c.gpstime) * 24 * 60) < 10之后 报错ORA-01652:无法通过128(在表空间TEMP)扩展TEMP段?
from (select a.deviceid,
f.ZWCM,
h.BWMC PORTNAME,
t.cbbh,
'正常' XINHAO,
a.gpstime,
'进港' state,
t.ywbh,
f.cbzldm,
to_char(t.czsj, 'yyyy-mm-dd hh24:mi:ss') time
from zxdb.DTYW_QZCY_JGORCG_SS t,
zxdb.DTYW_CBJBXX f,
zxdb.DTXT_BW h,
gps.gpsinfo a,
gps.boatinfo b
where t.cbbh = f.cbbh(+)
and t.bwdm = h.bwdm(+)
and f.zwcm = b.boatname(+)
and b.id = a.deviceid(+)
and t.jg_cg = 'j'
and t.czsj between to_date('2011-12-07 16', 'yyyy-mm-dd hh24') and
to_date('2011-12-08 16', 'yyyy-mm-dd hh24')) c
运行没有问题
在最外面加上
where trunc((sysdate - c.gpstime) * 24 * 60) < 10之后 报错ORA-01652:无法通过128(在表空间TEMP)扩展TEMP段?
select file_id from dba_temp_files where tablespace_name=你的表空间名;-- 使用刚刚查询出来的file_id更改时间表空间的增长方式为自动增长
alter database tempfile file_id autoextend on next 100M maxsize 1G;