Please send questions like this to the user forum in future, TIA.
Sander Hofstee wrote:
Hi,
I am using Hibernate 2.0.2 with SAPDB 7.4. I am trying to order by two concatenated columns,
where both columns are not-null false.
the query is somtehing like
select person.lastname, person.firstname from Person.class.getName() person order by (upper(person.lastname || person.firstname))
this works fine when both columns have non null values, but when one of the columns has a null
value SAPDB returns null for the whole concatenation, so mylastname concatenated with null is null and isn't ordered. SAPDB has a function (value(.., ...)) that replaces null values with a given value. But I don't know if I can call it from Hibernate or if Hibernate has a function with the same functionality.
Can anybody help me?
Thnx,
Sander
------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
-- Gavin King JBoss Group +61 410534454 http://hibernate.org
------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
