dbTalk Databases Forums  

newbie syntax question

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss newbie syntax question in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
brock wade
 
Posts: n/a

Default newbie syntax question - 03-03-2008 , 10:08 AM






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;

Reply With Quote
  #2  
Old   
DA Morgan
 
Posts: n/a

Default Re: newbie syntax question - 03-03-2008 , 10:46 AM






brock wade wrote:
Quote:
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


Reply With Quote
  #3  
Old   
DA Morgan
 
Posts: n/a

Default Re: newbie syntax question - 03-03-2008 , 10:46 AM



brock wade wrote:
Quote:
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


Reply With Quote
  #4  
Old   
DA Morgan
 
Posts: n/a

Default Re: newbie syntax question - 03-03-2008 , 10:46 AM



brock wade wrote:
Quote:
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


Reply With Quote
  #5  
Old   
DA Morgan
 
Posts: n/a

Default Re: newbie syntax question - 03-03-2008 , 10:46 AM



brock wade wrote:
Quote:
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


Reply With Quote
Reply




Thread Tools
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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.