Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Sequence exists but not accessible from script
On 25 Jan, 16:31, "David McNelis" <dmcne..._at_gmail.com> wrote:
> Good morning,
>
> I'm hoping someone can help me out with a problem I'm having. I've
> created a sequence, and the public synonym for the sequence.
>
> In a PL/SQL script I have the following line:
>
> SELECT sequencename.nextval into l_seqNum FROM dual;
>
> When the script runs I get the following:
> ERROR at line 47:
> ORA-06550: line 47, column 11:
> PL/SQL: ORA-02289: sequence does not exist
> ORA-06550: line 47, column 4:
> PL/SQL: SQL Statement ignored
>
> However, when I run the same statement from the SQL prompt outside of
> the script it works fine:
> SELECT sequencename.nextval FROM dual;
>
> Is there any reason why the sequence would be accessible outside of my
> script, but not inside? I'm running the script as the same user I run
> the working statement from.
>
> Any help is appreciated.
>
> David McNelis
Hmmmm... I smell a typo. Can you post the exact script your running, please?
HTH -g Received on Thu Jan 25 2007 - 10:41:17 CST