我使用了
public Query createSQLQuery(String sql, Map params) {
Query query = session.createSQLQuery(sql);
setParam(query, params);
return query;
}
这个方法进行查询SQL,以前一直是没问题的.
在oracle数据库中,现在碰到一条sql如下:
select t355.W28ID_full as union_EnumID,
t355.W28LF_full as mun_W28LF_full,
t355.range_Row,
t355.W28,
t355.W28ID,
t355.W28RG,
t355.W28LF,
t355.W28LV,
t355.C6841,
t355.C2515,
t355.C2516,
t355.C2517,
t355.C2518,
t355.C2519,
t355.C2520,
t355.C2521,
t355.C2522,
t355.C2523,
t355.C2524,
t355.C2525,
t355.C2526,
t355.C6539,
t355.C6540,
t355.C6839
from (select t355_Enum.W28ID as W28ID_full,
t355_Enum.W28LF as W28LF_full,
9 as range_Row,
t355_Enum.W28 as W28,
t355_Enum.W28ID as W28ID,
t355_Enum.W28RG as W28RG,
t355_Enum.W28LF as W28LF,
t355_Enum.W28LV as W28LV,
'序号_1' as C6841,
null as C2515,
null as C2516,
null as C2517,
t354.C2518 as C2518,
null as C2519,
null as C2520,
null as C2521,
null as C2522,
null as C2523,
null as C2524,
null as C2525,
null as C2526,
null as C6539,
null as C6540,
null as C6839
from (select name as W28,
ID as W28ID,
nodeLevel as W28LV,
nodeLeft as W28LF,
nodeRight as W28RG
from itrp_EnumDictItem
where dictionaryID = '297edff8357b46390135804cb394736d') t355_Enum
left join (select sum(t354_son.C6675) as C2518,
t354_son.W28ID,
t354_son.W28RG,
t354_son.W28LF,
t354_son.W28LV,
t354_son.W28
from rpd_179s1 t354_son
where 1 = 1
and t354_son.W1ID =
'8a819dd43090ffd50130921bccba0a6e'
and t354_son.W2ID = 'treeRoot'
and t354_son.isAudit >= '0'
and t354_son.isValidVersion >= '1'
group by t354_son.W28ID,
t354_son.W28RG,
t354_son.W28LF,
t354_son.W28LV,
t354_son.W28) t354 on (t355_Enum.W28ID =
t354.W28ID)
where 1 = 1
union all
select t354.W28ID as W28ID_full,
t354.W28LF as W28LF_full,
10 as range_Row,
t354.W28 as W28,
t354.W28ID as W28ID,
t354.W28RG as W28RG,
t354.W28LF as W28LF,
t354.W28LV as W28LV,
'序号_2' as C6841,
'其中:重点项目小计' as C2515,
null as C2516,
null as C2517,
sum(t354.C6675) as C2518,
sum(t354.C6676) as C2519,
null as C2520,
null as C2521,
sum(t354.C6679) as C2522,
null as C2523,
null as C2524,
null as C2525,
null as C2526,
null as C6539,
null as C6540,
null as C6839
from rpd_179s1 t354
where 1 = 1
and t354.W1ID = '8a819dd43090ffd50130921bccba0a6e'
and t354.W2ID = 'treeRoot'
and t354.isAudit >= '0'
and t354.isValidVersion >= '1'
and t354.C6835 = '是'
group by t354.W28ID, t354.W28RG, t354.W28LF, t354.W28LV, t354.W28
union all
select t354.W28ID as W28ID_full,
t354.W28LF as W28LF_full,
11 as range_Row,
t354.W28 as W28,
t354.W28ID as W28ID,
t354.W28RG as W28RG,
t354.W28LF as W28LF,
t354.W28LV as W28LV,
'序号_3' as C6841,
t354.C6672 as C2515,
null as C2516,
null as C2517,
t354.C6675 as C2518,
t354.C6676 as C2519,
t354.C6677 as C2520,
t354.C6678 as C2521,
t354.C6679 as C2522,
null as C2523,
t354.C6676 as C2524,
t354.C6682 as C2525,
t354.C6683 as C2526,
t354.C6738 as C6539,
t354.C6739 as C6540,
null as C6839
from rpd_179s1 t354
where 1 = 1
and t354.W1ID = '8a819dd43090ffd50130921bccba0a6e'
and t354.W2ID = 'treeRoot'
and t354.isAudit >= '0'
and t354.isValidVersion >= '1') t355
order by t355.W28LF_full asc, t355.range_Row
hiberate日志打印中这列是没有被截取的..
在oracle里面查询,执行的sql也是没有截取掉..但是通过hiberante返回的时候,结果查询出来,只出现'序'这一个字...
public Query createSQLQuery(String sql, Map params) {
Query query = session.createSQLQuery(sql);
setParam(query, params);
return query;
}
这个方法进行查询SQL,以前一直是没问题的.
在oracle数据库中,现在碰到一条sql如下:
select t355.W28ID_full as union_EnumID,
t355.W28LF_full as mun_W28LF_full,
t355.range_Row,
t355.W28,
t355.W28ID,
t355.W28RG,
t355.W28LF,
t355.W28LV,
t355.C6841,
t355.C2515,
t355.C2516,
t355.C2517,
t355.C2518,
t355.C2519,
t355.C2520,
t355.C2521,
t355.C2522,
t355.C2523,
t355.C2524,
t355.C2525,
t355.C2526,
t355.C6539,
t355.C6540,
t355.C6839
from (select t355_Enum.W28ID as W28ID_full,
t355_Enum.W28LF as W28LF_full,
9 as range_Row,
t355_Enum.W28 as W28,
t355_Enum.W28ID as W28ID,
t355_Enum.W28RG as W28RG,
t355_Enum.W28LF as W28LF,
t355_Enum.W28LV as W28LV,
'序号_1' as C6841,
null as C2515,
null as C2516,
null as C2517,
t354.C2518 as C2518,
null as C2519,
null as C2520,
null as C2521,
null as C2522,
null as C2523,
null as C2524,
null as C2525,
null as C2526,
null as C6539,
null as C6540,
null as C6839
from (select name as W28,
ID as W28ID,
nodeLevel as W28LV,
nodeLeft as W28LF,
nodeRight as W28RG
from itrp_EnumDictItem
where dictionaryID = '297edff8357b46390135804cb394736d') t355_Enum
left join (select sum(t354_son.C6675) as C2518,
t354_son.W28ID,
t354_son.W28RG,
t354_son.W28LF,
t354_son.W28LV,
t354_son.W28
from rpd_179s1 t354_son
where 1 = 1
and t354_son.W1ID =
'8a819dd43090ffd50130921bccba0a6e'
and t354_son.W2ID = 'treeRoot'
and t354_son.isAudit >= '0'
and t354_son.isValidVersion >= '1'
group by t354_son.W28ID,
t354_son.W28RG,
t354_son.W28LF,
t354_son.W28LV,
t354_son.W28) t354 on (t355_Enum.W28ID =
t354.W28ID)
where 1 = 1
union all
select t354.W28ID as W28ID_full,
t354.W28LF as W28LF_full,
10 as range_Row,
t354.W28 as W28,
t354.W28ID as W28ID,
t354.W28RG as W28RG,
t354.W28LF as W28LF,
t354.W28LV as W28LV,
'序号_2' as C6841,
'其中:重点项目小计' as C2515,
null as C2516,
null as C2517,
sum(t354.C6675) as C2518,
sum(t354.C6676) as C2519,
null as C2520,
null as C2521,
sum(t354.C6679) as C2522,
null as C2523,
null as C2524,
null as C2525,
null as C2526,
null as C6539,
null as C6540,
null as C6839
from rpd_179s1 t354
where 1 = 1
and t354.W1ID = '8a819dd43090ffd50130921bccba0a6e'
and t354.W2ID = 'treeRoot'
and t354.isAudit >= '0'
and t354.isValidVersion >= '1'
and t354.C6835 = '是'
group by t354.W28ID, t354.W28RG, t354.W28LF, t354.W28LV, t354.W28
union all
select t354.W28ID as W28ID_full,
t354.W28LF as W28LF_full,
11 as range_Row,
t354.W28 as W28,
t354.W28ID as W28ID,
t354.W28RG as W28RG,
t354.W28LF as W28LF,
t354.W28LV as W28LV,
'序号_3' as C6841,
t354.C6672 as C2515,
null as C2516,
null as C2517,
t354.C6675 as C2518,
t354.C6676 as C2519,
t354.C6677 as C2520,
t354.C6678 as C2521,
t354.C6679 as C2522,
null as C2523,
t354.C6676 as C2524,
t354.C6682 as C2525,
t354.C6683 as C2526,
t354.C6738 as C6539,
t354.C6739 as C6540,
null as C6839
from rpd_179s1 t354
where 1 = 1
and t354.W1ID = '8a819dd43090ffd50130921bccba0a6e'
and t354.W2ID = 'treeRoot'
and t354.isAudit >= '0'
and t354.isValidVersion >= '1') t355
order by t355.W28LF_full asc, t355.range_Row
hiberate日志打印中这列是没有被截取的..
在oracle里面查询,执行的sql也是没有截取掉..但是通过hiberante返回的时候,结果查询出来,只出现'序'这一个字...