-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: DB2/400 V4R5 ORDER BY workaround?
PostPosted: Thu Sep 16, 2004 5:38 am 
Newbie

Joined: Thu Mar 11, 2004 6:44 am
Posts: 3
Location: Milano Italy
I am using Hibernate 2.1 with DB2 for iSeries (AS400).

I have read the other posts in the forum concerning the problems with older versions of AS400 and the ORDER BY clause although I am not sure if the problem has ever been accurately described (and thus a truly good workaround ever suggested).

The problem is that the column name specified in the ORDER BY clause must be the alias if the column is aliased in the SELECT clause. DB2 actually gives a rather nice error message:

Quote:
The column or expression is in the SELECT list but the result column is renamed using an AS clause. If the AS clause is used to name a column in the result table, the name specified on the AS clause must be the name specified on the ORDER BY clause.


Any suggestions for a workaround? Is there any way I can extend the framework (instead of hacking the source) to resolve this issue.

Thanks.

Hibernate kicks a$$ btw. It is truly a pleasure to work with this software, such a rarity indeed.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 17, 2004 12:26 pm 
Beginner
Beginner

Joined: Mon Nov 10, 2003 7:09 pm
Posts: 28
The best solution is to upgrade to V5R2 where they've fixed this limitation. Beyond that, you're at the source hacking point.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.