I ran the tkprof on the code and found that it is still generating the literal non-shared SQL. Because the code uses dynamic sql.
However, you did convert the string to a workable expression that got summed and assigned to the result number variable. Our past programmer did the similar thing. He created the expression as a string, concatenated as 'select ' || my_string || ' from dual;' and passed it as an argument to a function that used a native dynamic SQL to execute it. my_string := 'select ' || '1 + 1 + 2' || ' from dual;'; execute immediate my_string into my_number_variable; So I am back to SQUARE ONE. Thanks however for a great try. Shakir --- Mohammed Shakir <[EMAIL PROTECTED]> wrote: > Thanks so much for your time and effort. > > Correct code was found in the attachement. It compiles and runs as > you > described. You found a very innovative way of converting the string > to > an expression. > > I will need to check on whether it creates the Shared or non-shared > SQL. > That will be the determining factor for us to use it. > > If it works, you could save my project at least a month of effort. > So thanks for help. > > Shakir > > > --- "Jamadagni, Rajendra" <[EMAIL PROTECTED]> wrote: > > Here you go > > > > Raj > > ______________________________________________________ > > Rajendra Jamadagni MIS, ESPN Inc. > > Rajendra dot Jamadagni at ESPN dot com > > Any opinion expressed here is personal and doesn't reflect that of > > ESPN Inc. > > > > QOTD: Any clod can have facts, but having an opinion is an art! > > > > > > -----Original Message----- > > From: Mohammed Shakir [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, April 04, 2002 12:25 PM > > To: Jamadagni, Rajendra > > Subject: RE: Literal SQL and sys.dual > > > > > > Thanks for your help and sending the code three times. I know it > can > > be > > a bother. > > > > However, Can you just tell me in a yes/no, if this is the code you > > are > > sending me? The code I have received it is shown below. > > > > Thanks > > > > Shakir > > > > --- "Jamadagni, Rajendra" <[EMAIL PROTECTED]> wrote: > > > For the 3rd time I am sending this code, Mohammad, it wouldn't be > a > > > bad idea > > > to try to resolve the code yourself. > > > > > > CREATE OR REPLACE PACKAGE BODY My_Dynamic_Stuff IS > > > v_result NUMBER; > > > -- > > > PROCEDURE eval_this (pi_string IN VARCHAR2) IS > > > BEGIN > > > RTRIM(pi_string,';') || '; end;'; > > > END eval_this; > > > -- > > > END My_Dynamic_Stuff; > > > / > > > > > > If the mail software is truncating it, I can't help. > > > Raj > > > ______________________________________________________ > > > Rajendra Jamadagni MIS, ESPN Inc. > > > Rajendra dot Jamadagni at ESPN dot com > > > Any opinion expressed here is personal and doesn't reflect that > of > > > ESPN Inc. > > > > > > QOTD: Any clod can have facts, but having an opinion is an art! > > > > > > > **************************************************************************** > > ***1 > > > > > > This e-mail message is confidential, intended only for the named > > > recipient(s) above and may contain information that is > privileged, > > > attorney work product or exempt from disclosure under applicable > > law. > > > If you have received this message in error, or are not the named > > > recipient(s), please immediately notify ESPN at (860) 766-2000 > and > > > delete this e-mail message from your computer, Thank you. > > > > > > > > > **************************************************************************** > > ***1 > > > > > > > > > ===== > > Mohammed Shakir > > CompuSoft, Inc. > > 11 Heather Way > > East Brunswick, NJ 08816-2825 > > (732) 672-0464 (Cell) > > (732) 257-6001 (Home) > > > > __________________________________________________ > > Do You Yahoo!? > > Yahoo! Tax Center - online filing with TurboTax > > http://taxes.yahoo.com/ > > > > > > > ATTACHMENT part 2 application/octet-stream > name=MY_DYNAMIC_STUFF.PKS > > > > > *********************************************************************2 > > > > This e-mail message is confidential, intended only for the named > > recipient(s) above and may contain information that is privileged, > > attorney work product or exempt from disclosure under applicable > law. > > If you have received this message in error, or are not the named > > recipient(s), please immediately notify corporate MIS at (860) > > 766-2000 and delete this e-mail message from your computer, Thank > > you. > > > > > *********************************************************************2 > > > > > > > ===== > Mohammed Shakir > CompuSoft, Inc. > 11 Heather Way > East Brunswick, NJ 08816-2825 > (732) 672-0464 (Cell) > (732) 257-6001 (Home) > > __________________________________________________ > Do You Yahoo!? > Yahoo! Tax Center - online filing with TurboTax > http://taxes.yahoo.com/ > -- > Please see the official ORACLE-L FAQ: http://www.orafaq.com > -- > Author: Mohammed Shakir > INET: [EMAIL PROTECTED] > > 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: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in > the message BODY, include a line containing: UNSUB ORACLE-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). ===== Mohammed Shakir CompuSoft, Inc. 11 Heather Way East Brunswick, NJ 08816-2825 (732) 672-0464 (Cell) (732) 257-6001 (Home) __________________________________________________ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Mohammed Shakir INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-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).