select * from (SELECT t1.serialno,t1.partid,replace(replace(t1.filepath,t2.disk,'ftp://'||t2.username||':'||t2.password||'@'||t2.ftpaddress||':'||t2.port ),'\','/') FilePath
FROM T_AG_RECORDFILE t1 inner join T_AG_RecordfileFTP t2 on substr(t1.filepath,1,2)=t2.disk Where t2.citylist='04')t3 inner join
(select t.serialno,t.partid,t.acceptbegintime,t.acceptduration,t.accepterno,t.acceptid,t.callerno,t.calleeno,t.usergrade,t.usertype,t.contactbegintime,t.contactendtime,t.callcausedescs from icdmain.t_Pub_Commoninfo t
where t.accepterno in ( select t.agentid from icd.tagentinfo t where t.workgroupid='31')) t4 on t3.serialno=t4.serialno and t3..partid=t4..partid;
FROM T_AG_RECORDFILE t1 inner join T_AG_RecordfileFTP t2 on substr(t1.filepath,1,2)=t2.disk Where t2.citylist='04')t3 inner join
(select t.serialno,t.partid,t.acceptbegintime,t.acceptduration,t.accepterno,t.acceptid,t.callerno,t.calleeno,t.usergrade,t.usertype,t.contactbegintime,t.contactendtime,t.callcausedescs from icdmain.t_Pub_Commoninfo t
where t.accepterno in ( select t.agentid from icd.tagentinfo t where t.workgroupid='31')) t4 on t3.serialno=t4.serialno and t3..partid=t4..partid;
解决方案 »
- 求sql优化建议,急 ,急 !
- oracle9i 树型结构数据展平
- 如何使用Veritas NetBackup工具进行oracle数据库的备份和恢复
- 用exp导出的system用户下的表,如何导入到user用户下?
- 谁有ORACLE的中文帮助文档
- 关于WHERE条件等于空的问题,请帮忙,急~~~~
- 诚求用一条SELECT 语句解决个问题?
- 一个很基础基础的问题:如何把数据库里的所有的表中的记录一次清空(不能删除表的)?
- 关于导入、导出问题 急!!!!!!
- Oracle在OEM中怎么管理数据库里面的内容?(有没有这方面的书--图形化界面)
- sql 中单引号包单引号应该怎么处理呀?
- alter database datafile报错!!!1111
SELECT *
FROM (SELECT t1.serialno, t1.partid,
REPLACE (REPLACE (t1.filepath,
t2.disk,
'ftp://'
|| t2.username
|| ':'
|| t2.PASSWORD
|| '@'
|| t2.ftpaddress
|| ':'
|| t2.port
),
'\',
'/'
) filepath
FROM t_ag_recordfile t1 INNER JOIN t_ag_recordfileftp t2
ON SUBSTR (t1.filepath, 1, 2) = t2.disk
WHERE t2.citylist = '04') t3
INNER JOIN
(SELECT t.serialno, t.partid, t.acceptbegintime, t.acceptduration,
t.accepterno, t.acceptid, t.callerno, t.calleeno, t.usergrade,
t.usertype, t.contactbegintime, t.contactendtime,
t.callcausedescs
FROM icdmain.t_pub_commoninfo t
WHERE t.accepterno IN (SELECT t.agentid
FROM icd.tagentinfo t
WHERE t.workgroupid = '31')) t4
ON t3.serialno = t4.serialno AND t3.partid = t4.partid
;
最后段 t3..partid=t4..partid; 多了两个.