Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Doing an Oracle db query with a PL/SQL Function in where clause
Doing an Oracle db query with a PL/SQL Function in where clause [message #1219563] Wed, 04 December 2013 16:26 Go to next message
Christophe Pruvost is currently offline Christophe PruvostFriend
Messages: 1
Registered: December 2013
Junior Member
Hi all

I would like to do a query like that :

select o from VPdcinfo o where GET_MODULO_FROM_ID(o.id) = :NumModulo

The problem is that my Oracle PL/SQL function "GET_MODULO_FROM_ID" is not supported and generate an error....

An idea please...?

Ty for all

PS : fyi GET_MODULO_FROM_ID runs well using sqlplus...Surprised)
Re: Doing an Oracle db query with a PL/SQL Function in where clause [message #1719042 is a reply to message #1219563] Mon, 04 January 2016 16:39 Go to previous messageGo to next message
Fabio Higor is currently offline Fabio HigorFriend
Messages: 1
Registered: January 2016
Junior Member
Good afternoon,
  I'm going through the same problem, I need to put variables in session and can not. Found a solution?
Re: Doing an Oracle db query with a PL/SQL Function in where clause [message #1719080 is a reply to message #1719042] Tue, 05 January 2016 01:03 Go to previous messageGo to next message
Clovis Wichoski is currently offline Clovis WichoskiFriend
Messages: 11
Registered: January 2016
Junior Member
Use EclipseLink JPQL extension SQL[1], to encapsulate custom database functions.

[1] https://www.eclipse.org/eclipselink/documentation/2.6/jpa/extensions/jpql.htm#sql
Re: Doing an Oracle db query with a PL/SQL Function in where clause [message #1719376 is a reply to message #1719080] Thu, 07 January 2016 14:38 Go to previous message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1389
Registered: July 2009
Senior Member
You might also want to see "FUNCTION" which will allow you to mix JPQL into it: "SELECT o FROM VPdcinfo o WHERE FUNCTION('GET_MODULO_FROM_ID',o.id) = :NumModulo"

https://www.eclipse.org/eclipselink/documentation/2.6/jpa/extensions/jpql.htm#func

[Updated on: Thu, 07 January 2016 14:41]

Report message to a moderator

Previous Topic:Eclipselink is attempting to convert fields it's not supposed to
Next Topic:RollbackException for tree structure
Goto Forum:
  


Current Time: Fri Apr 19 13:15:43 GMT 2024

Powered by FUDForum. Page generated in 0.01991 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top