原报错SQL语句:
select b.loginid as uid, a.loginid, a.loginname, a.OfficeCode, a.area, a.Association, a.State, OfficeType from K_Company a
left join (select loginid, OfficeCode from K_Micfo union select loginid, OfficeCode from K_MicfoNo) b on a.OfficeCode = b.OfficeCode
错误:
> ORA-00923: FROM keyword not found where expected
原因:“select b.loginid as uid” uid为Oracle的保留关键字,
解决方法:加上双引号处理数据库保留字符,效果等同于SQL中的 []。问题解决
select b.loginid as "uid", a.loginid
查询Oracle关键字
select * from v$reserved_words order by KEYWORD