列名无效的问题!
public List getPlatformList(String pf){
String sql="select t4.deviceid,t4.devicetype,t4.devicename,t4.stationid,t4.xpoint,t4.ypoint,t4.platform,t5.downlinkid as downlinkids from t_platform_topo t4 left join (select t1.deviceid,t2.downlinkid from t_platform_topo t1 , t_node_display t2 ,t_station t3 "+
"where t1.stationid=t3.stationid and t2.station=t3.stationname and instr(t2.nodename,t1.devicename)>0 and t1.platform ='"+pf+"' and t1.devicetype=3) t5 on "+
"t4.deviceid = t5.deviceid where t4.platform='"+pf+"'";
return getJdbcTemplate().query(sql, new PlatformTopoMapper());
}
class PlatformTopoMapper implements RowMapper{
public Object mapRow(ResultSet rowSet, int rowNum) throws SQLException {
final PlatformTopoBO bo = new PlatformTopoBO();
bo.setDeviceid(rowSet.getLong("deviceid"));
bo.setDevicename(rowSet.getString("devicename"));
bo.setDevicetype(rowSet.getInt("devicetype"));
bo.setPlatform(rowSet.getString("platform"));
bo.setStationid(rowSet.getInt("stationid"));
bo.setXpoint(rowSet.getInt("xpoint"));
bo.setYpoint(rowSet.getInt("ypoint"));
bo.setDownlinkid(rowSet.getString("downlinkids")); return bo;
}
}
红色部分就是发出报错的地方! 数据库查没有问题 可能因为这个t5不是一个实际意义的表 所以不能识别downlinkid 请高手指教下!
String sql="select t4.deviceid,t4.devicetype,t4.devicename,t4.stationid,t4.xpoint,t4.ypoint,t4.platform,t5.downlinkid as downlinkids from t_platform_topo t4 left join (select t1.deviceid,t2.downlinkid from t_platform_topo t1 , t_node_display t2 ,t_station t3 "+
"where t1.stationid=t3.stationid and t2.station=t3.stationname and instr(t2.nodename,t1.devicename)>0 and t1.platform ='"+pf+"' and t1.devicetype=3) t5 on "+
"t4.deviceid = t5.deviceid where t4.platform='"+pf+"'";
return getJdbcTemplate().query(sql, new PlatformTopoMapper());
}
class PlatformTopoMapper implements RowMapper{
public Object mapRow(ResultSet rowSet, int rowNum) throws SQLException {
final PlatformTopoBO bo = new PlatformTopoBO();
bo.setDeviceid(rowSet.getLong("deviceid"));
bo.setDevicename(rowSet.getString("devicename"));
bo.setDevicetype(rowSet.getInt("devicetype"));
bo.setPlatform(rowSet.getString("platform"));
bo.setStationid(rowSet.getInt("stationid"));
bo.setXpoint(rowSet.getInt("xpoint"));
bo.setYpoint(rowSet.getInt("ypoint"));
bo.setDownlinkid(rowSet.getString("downlinkids")); return bo;
}
}
红色部分就是发出报错的地方! 数据库查没有问题 可能因为这个t5不是一个实际意义的表 所以不能识别downlinkid 请高手指教下!
...全文
相关推荐
sql warning报错出错信息说明
- **错误 111**:''%1!'' 不是查询中的有效列名。这表示在查询中使用了一个不存在的列名。- **错误 112**:%1! 不是有效的表名。这表示在查询中使用了一个不存在的表名。
解决delphi TAdoQuery组件的close方法导致”列名无效“错误的问题
然而,在某些情况下,使用TAdoQuery的`Close`方法可能会引发"列名无效"的错误。这个问题通常是由于数据库操作的顺序或者临时表管理不当导致的。以下是对这个问题的深入解析和解决方案。1.
解决pandas展示数据输出时列名不能对齐的问题
然而,在实际使用中,我们可能会遇到各种问题,其中之一就是在输出Pandas DataFrame时,列名没有正确对齐,尤其是在列名包含中文字符的情况下。
pandas修改DataFrame列名的实现方法
首先,让我们理解一下问题背景。
python获取Pandas列名的几种方法
继续探索Pandas库,你会发现更多强大的功能和工具,帮助你解决复杂的数据问题。


Web 开发
