Garayed.com  

Go Back   Garayed.com > Oracle
FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-03-2008, 03:08 PM
brock wade
 
Posts: n/a
Default newbie syntax question

Thanks to anyone with any clues here as to what could be wrong with my
code, I'm totally new to Oracle!

In my Oracle Package Body (Package compiles fine) I'm getting an error
on this line of code saying: "ORA-02289: sequence does not exist":

select usr_id_s1.nextval into pUSER_id from dual;

Here is the complete stored procedure:

Procedure UserSecurityAdd(pUSER_login in users_t1.usr_login
%type,
pUSER_lname in users_t1.usr_lname
%type,
pUSER_fname in users_t1.usr_fname
%type,
pUSER_mi in users_t1.usr_mi%type,
pUSER_pcd_view in users_t1.usr_pcd_view
%type,
pUSER_emp_id in users_t1.usr_emp_id
%type,
pRowsAffected out number) is

begin
select usr_id_s1.nextval into pUSER_id from dual;
insert into users_t1
( usr_emp_id,
usr_login,
usr_lname,
usr_fname,
usr_mi,
usr_pcd_view)
values
( pUSER_emp_id,
pUSER_login,
pUSER_lname,
pUSER_fname,
pUSER_mi,
pUSER_pcd_view);

commit;
pRowsAffected := sql%rowcount;
end UserSecurityAdd;
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-03-2008, 03:46 PM
DA Morgan
 
Posts: n/a
Default Re: newbie syntax question

brock wade wrote:
> Thanks to anyone with any clues here as to what could be wrong with my
> code, I'm totally new to Oracle!
>
> In my Oracle Package Body (Package compiles fine) I'm getting an error
> on this line of code saying: "ORA-02289: sequence does not exist":
>
> select usr_id_s1.nextval into pUSER_id from dual;
>
> Here is the complete stored procedure:
>
> Procedure UserSecurityAdd(pUSER_login in users_t1.usr_login
> %type,
> pUSER_lname in users_t1.usr_lname
> %type,
> pUSER_fname in users_t1.usr_fname
> %type,
> pUSER_mi in users_t1.usr_mi%type,
> pUSER_pcd_view in users_t1.usr_pcd_view
> %type,
> pUSER_emp_id in users_t1.usr_emp_id
> %type,
> pRowsAffected out number) is
>
> begin
> select usr_id_s1.nextval into pUSER_id from dual;
> insert into users_t1
> ( usr_emp_id,
> usr_login,
> usr_lname,
> usr_fname,
> usr_mi,
> usr_pcd_view)
> values
> ( pUSER_emp_id,
> pUSER_login,
> pUSER_lname,
> pUSER_fname,
> pUSER_mi,
> pUSER_pcd_view);
>
> commit;
> pRowsAffected := sql%rowcount;
> end UserSecurityAdd;


You are asking a sequence "s1" to provide you with the next value.
From the standpoint of your session it does not exist. Meaning
either it was never created or you do not have privileges to
access it.
--
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:10 AM.




LinkBacks Enabled by vBSEO 3.0.0 © 2007, Crawlability, Inc.