Hello,
I have a strange problem with following query:
Quote:
SELECT 'PDF' dsp, 'PDF' ret FROM dual UNION ALL SELECT 'XXLS' dsp, 'XLS' ret FROM dual
Which of course should return following result:
dsp ret
PDF PDF
XXLS XLS
And I get:
dsp ret
PDF P
XXLS X
I noticed that if column contains strings with the same length (in my example
'PDF' and 'XLS' with length 3) only first sign of string is present in result set ('P' and 'X', resp.).
I use
createSQLQuery method of
org.hibernate.Session:
Code:
String sql = "select 'PDF' dsp, 'PDF' ret from dual union all select 'XXLS' dsp, 'XLS' ret from dual";
Query query = session.createSQLQuery(sql);
List result = q.list();
I would not like to change the query.
Thx in advance,
Michal