转自:http://www.javabrother.net/viewthread.php?tid=3447
java.sql.SQLException: ORA-00918: 未明确定义列ORA-00918, 异常,
Oraclejava.sql.SQLException: ORA-00918: 未明确定义列
大概就是报的这个异常,意思就是有两个或者多个相同的列,Oracle它不知道怎么办,所以就报这个异常,希望你去解决,^_^
select b.id,b.customname, datadescription as cusType,b.customcode, datadescription as cusState from cstcustom b left join sysdictionary c on b.customstate = c.dataid and c.datatypecode = 'CustomState' left join sysdictionary d on b.customtypeid = d.dataid and d.datatypecode = 'CustomType' where b.customstate != 2
改过后:
select b.id,b.customname, d.datadescription as cusType,b.customcode, c.datadescription as cusState from cstcustom b left join sysdictionary c on b.customstate = c.dataidand c.datatypecode = 'CustomState' left join sysdictionary d on b.customtypeid = d.dataid and d.datatypecode = 'CustomType' where b.customstate != 2
就OK了!