-->
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: How to call an Oracle Function that returns a VARCHAR
PostPosted: Wed Jun 12, 2013 5:19 pm 
Newbie

Joined: Wed Jun 12, 2013 4:48 pm
Posts: 1
Hi,

I just wanted to know what would be the correct way, through hibernate, to call an Oracle function where there are multiple SELECTS to multiple tables and returns a single VARCHAR2 value. I've seen a number of ways to do this such as with NamedQueries (annotations and XML configuration), or use the doWork method from the Session. Is there a best-practice? If so, please let me know with an example.

Thanks,

Juan


Top
 Profile  
 
 Post subject: Re: How to call an Oracle Function that returns a VARCHAR
PostPosted: Wed Jun 26, 2013 5:34 am 
Newbie

Joined: Fri Jun 21, 2013 10:32 am
Posts: 2
I had a similar situation so I used clob but you can definitely used varchar2(32656). Hope this helps

Function function_name
returen varchar2 (or use clob)
is

ret_val varchar2(32656) or ( user retval clob);
begin
.. your code here

return retval;
end;

_________________
Check Out Money Making Engine getpaidreviewproducts.com


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.