Skip to main content



      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 11:26 Go to next message
Eclipse UserFriend
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 11:39 Go to previous messageGo to next message
Eclipse UserFriend
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] Mon, 04 January 2016 20:03 Go to previous messageGo to next message
Eclipse UserFriend
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 09:38 Go to previous message
Eclipse UserFriend
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 09:41] by Moderator

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


Current Time: Wed Jul 02 17:21:00 EDT 2025

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

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

Back to the top