-->
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.  [ 3 posts ] 
Author Message
 Post subject: string concatenation
PostPosted: Wed Jan 28, 2004 12:08 pm 
Newbie

Joined: Mon Jan 19, 2004 1:54 pm
Posts: 8
Dear all,
The project I am involving right now deals with a lot data. So in order to optimize my searching criteria, i want to concatenate two variables(both are strings).
e.g. from Documents as docs where doc.fromZip+doc.toZip in ('005005'),
it didn't throw me any error, but didn't return anything either(should return one record though).
But I tried: from Documents as docs where doc.fromZip='a' in ('005a'), it gives me the correct results.
Can anyone explain why is it? Does that mean Hibernate won't allow you concatenate two variables?

Thank you very much!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 28, 2004 3:56 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
What is your database's string concatenation operator? It is usually: ||


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 29, 2004 11:35 pm 
Newbie

Joined: Mon Jan 19, 2004 1:54 pm
Posts: 8
I've tried ||, but it threw an error. My db server is MySQL, anyway, I've found another way to bypass.
Thank you


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.