From: Andrei P. <ap...@lu...> - 2004-03-30 20:37:43
|
Hello, all ! My PostgreSQL complaining about some errors in SQL query as listed below: "postgres[95440]: [1-1] NOTICE: adding missing FROM-clause entry for table "ipinterface" Digging through the source tree reveals possible cause on line 223 in file src/web/src/org/opennms/web/element/NetworkElementFactory.java: PreparedStatement stmt = conn.prepareStatement( "SELECT DISTINCT * FROM NODE WHERE NODE.NODEID=IPINTERFACE.NODEID AND IPLIKE(IPINTERFACE.IPADDR,?) AND NODETYPE != 'D' ORDER BY NODELABEL" ); Looks like it should be: PreparedStatement stmt = conn.prepareStatement( "SELECT DISTINCT * FROM NODE, IPINTERFACE WHERE NODE.NODEID=IPINTERFACE.NODEID AND IPLIKE(IPINTERFACE.IPADDR,?) AND NODETYPE != 'D' ORDER BY NODELABEL" ); WBR, Andrei Poelov |