-->
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: Can we call stored functions using Native SQL syntax?
PostPosted: Thu Apr 13, 2006 4:52 am 
Regular
Regular

Joined: Wed Apr 12, 2006 12:49 am
Posts: 105
Location: Malaysia
Assumming I have a stored functions in Oracle database called getSalary() that takes employee id as parameter.

I wonder whether we can call this function using Native SQL syntax, since if we use the hibernate stored procedures syntax, it requires us to return a resultset, which in my case, most of my existing functions return specific values and not a result.

Eg. can we do this?

Double sal = (Double) sess.createSQLQuery("select getSalary(100) as salary from dual")

Please advise.
Thank you.

_________________
Thank you.

Regards,
Jap.


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.