Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Concatenating strings using JPA and MS SQL without CONCAT function

765440Apr 8 2010 — edited Apr 9 2010
Hi all,
I have the following question. I have a query like this +'select e from Entity e where concat(e.field1,e.field2)='alabala''+ but the MS SQL doesn't have built-in function concat* (only '+' is available for concatenating strings). On the other hand if I replace the concat function in my JPQL query with '+' I get exception that the operands of the operator '+' are not of numeric type. Can you help me with the solution of this problem I have? One possible workaround could be to make additional column in the table with the value "field1+field2" but I prefer not to do that. What is more I think this is pretty common requirement and the solution should be easy I hope :)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 7 2010
Added on Apr 8 2010
2 comments
2,042 views