-->
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.  [ 1 post ] 
Author Message
 Post subject: HQL concatenation operator || doesn't work
PostPosted: Fri May 13, 2011 10:24 am 
Newbie

Joined: Thu May 05, 2011 1:54 pm
Posts: 1
I'm trying to execute a the following query, but it doesn't work.

select i.name|| ' - ' || i.name from Item i

I'm getting this excpetion:

org.hibernate.QueryException: , expected in SELECT [select i.name || ' - ' || i.name from com.(...).Item i]

I could resolve it using the concat(...) function. I found another issue. This query works properly:

select concat(i.name, concat(' - ', i.name)) from Item i

but this doesn't:

select concat(concat(i.name, ' - '), i.name) from Item i

I'm tried this with the last version of hibernate and oracle as db.

Any idea?


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

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.