[prev in list] [next in list] [prev in thread] [next in thread] 

List:       odtug-java-l
Subject:    RE: To convert a String to a mathematical expression
From:       "Brokvam, Roy" <roy.brokvam () cgey ! com>
Date:       2002-09-02 12:47:09
[Download RAW message or body]

Since this is an Oracle list, I suggest that you create your own stored
PL/SQL function:

CREATE OR REPLACE FUNCTION expr(p_expression IN VARCHAR2) RETURN NUMBER
IS
  TYPE expr_cursor_type IS REF CURSOR;
  expr_cursor expr_cursor_type;
  result NUMBER;
BEGIN
  OPEN expr_cursor FOR 'SELECT '||p_expression||' FROM dual';
  FETCH expr_cursor INTO result;
  CLOSE expr_cursor;
  RETURN result;
END;

and then use this function from your java code.

I guess I just revealed my ignorance about java :) but hey, it's good to be
of some assistance!


Regards,
Roy Brokvam


This message contains information that may be privileged or confidential and is the \
property of the Cap Gemini Ernst & Young Group. It is intended only for the person to \
whom it is addressed. If you are not the intended recipient, you are not authorized \
to read, print, retain, copy, disseminate, distribute, or use this message or any \
part thereof. If you receive this message in error, please notify the sender \
immediately and delete all copies of this message.

Thanks to everyone for making ODTUG 2002 a great success!  Plan now
for next year's conference: Loews Miami Beach, Florida, June 22-27, 2003.
-- 
Author: Brokvam, Roy
  INET: roy.brokvam@cgey.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ODTUG-JAVA-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic