-->
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: "Like" query appears to produce invalid sql
PostPosted: Wed Oct 29, 2003 5:44 pm 
Regular
Regular

Joined: Tue Sep 09, 2003 9:37 pm
Posts: 56
Location: Ogden, Utah, USA
HQL:
select obj from obj in class com.mvsc.czee.business.codes.jurisdiction.Country where (upper( obj.description) like ?

produces:
select obj.country_id as country_id, obj.country_cd as country_cd, obj.description_txt as descript3_ from RM_COUNTRY obj where ((upper(obj.description_txt)like ? )

I think the "like" needs a space in front, or it gives me a sql syntax error:

SQL0104N An unexpected token "END-OF-STATEMENT" was found following "ription_txt)like ? )

I've looked into fixing it but don't see a quick way to go about it. Any ideas?

Thanks,
Jenica


Top
 Profile  
 
 Post subject: Re: "Like" query appears to produce invalid sql
PostPosted: Wed Oct 29, 2003 6:50 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
TealWren wrote:
where (upper( obj.description) like ?

... opens 2 brackets and close only 1

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 29, 2003 8:26 pm 
Regular
Regular

Joined: Tue Sep 09, 2003 9:37 pm
Posts: 56
Location: Ogden, Utah, USA
I'll bet that's the problem! Thanks!!


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.