Re: avoid dynamic SQL

From: Michael Moore <michaeljmoore_at_gmail.com>
Date: Wed, 1 Jul 2009 09:13:12 -0700
Message-ID: <26fdee6e0907010913qa13a061lca5d0d56eef1ec77_at_mail.gmail.com>



Actually my CONTEXT suggestion was in response to the original question. I have not read the entire thread so maybe this has already been suggested. I'm just putting it out there.Mike

On Wed, Jul 1, 2009 at 7:56 AM, Edgar Chupit <chupit_at_gmail.com> wrote:

> Yep, I have tried CONTEXT on 10g as well, same result as with bind
> variables (simple example):
>
> SQL> select XMLQuery(SYS_CONTEXT('USERENV','SESSIONID') returning
> content).getnumberval() result
> 2 from dual
> 3 /
>
> select XMLQuery(SYS_CONTEXT('USERENV','SESSIONID') returning
> content).getnumberval() result
> from dual
>
> ORA-19102: XQuery string literal expected
>
> But this works fine:
>
> SQL> select XMLQuery('1231241' returning content).getnumberval() result
> 2 from dual
> 3 /
>
> RESULT
> ----------
> 1231241
>
>
>
> Best regards,
> Edgar Chupit
> callto://edgar.chupit
>
>
>
> On Wed, Jul 1, 2009 at 4:50 PM, Michael Moore<michaeljmoore_at_gmail.com>
> wrote:
> > Have you considered using CONTEXT variables?
> >
> > On Wed, Jul 1, 2009 at 6:45 AM, Edgar Chupit <chupit_at_gmail.com> wrote:
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jul 01 2009 - 11:13:12 CDT

Original text of this message