首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

SQL command not properly ended错误

2014-01-28 
------解决方法--------------------------------------------------------惶鮯ql语句: select t1.borrow_

------解决方法--------------------------------------------------------惶鮯ql语句:
select t1.borrow_id as borrow_id,
t2.El_Name as resource_name,
t2.El_LabelID as resource_labelid,
t3.user_name as user_name,
t3.user_organization as user_unit,
t1.Borrow_Date as resource_date,
t1.Borrow_ID as objid
from INTEL.CS_EleBorrowInfo t1,
intel.CS_ElectronicInfo t2,
cs_userinfo t3
where t1.Borrow_ObjectID = t2.El_ID
and t1.Borrow_UserID = t3.user_id
and t1.Borrow_Date > to_date( '2007-9-4 ', 'yyyy-mm-dd ')
and t1.Borrow_Date < to_date( '2007-9-5 ', 'yyyy-mm-dd ')
order by t1.Borrow_Date desc -- 错误出现在这里
union
select t1.borrow_id as borrow_id,
t2.Film_Name as resource_name,
t2.Film_LabelID as resource_labelid,
t3.user_name as user_name,
t3.user_organization as user_unit,
t1.Borrow_Date as resource_date,
t1.Borrow_ID as objid
from INTEL.CS_FilmBorrowInfo t1, intel.CS_FilmInfo t2, cs_userinfo t3
where t1.Borrow_ObjectID = t2.Film_ID
and t1.Borrow_UserID = t3.user_id
and t1.Borrow_Date > to_date( '2007-9-4 ', 'yyyy-mm-dd ')
and t1.Borrow_Date < to_date( '2007-9-5 ', 'yyyy-mm-dd ')
order by t1.Borrow_Date desc
union
select t1.borrow_id as borrow_id,
t2.ReliefMap_Name as resource_name,
t2.ReliefMap_LabelID as resource_labelid,
t3.user_name as user_name,
t3.user_organization as user_unit,
t1.Borrow_Date as resource_date,
t1.Borrow_ID as objid
from INTEL.CS_MapBorrowInfo t1,
intel.CS_ReliefMapInfo t2,
cs_userinfo t3
where t1.Borrow_ObjectID = t2.ReliefMap_ID
and t1.Borrow_UserID = t3.user_id
and t1.Borrow_Date > to_date( '2007-9-4 ', 'yyyy-mm-dd ')
and t1.Borrow_Date < to_date( '2007-9-5 ', 'yyyy-mm-dd ')
order by t1.Borrow_Date desc
union
select t1.borrow_id as borrow_id,
t2.Book_Name as resource_name,
t2.Book_LabelID as resource_labelid,
t3.user_name as user_name,