dbTalk Databases Forums  

Trigger

comp.databases.oracle.tools comp.databases.oracle.tools


Discuss Trigger in the comp.databases.oracle.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bumsys@gmail.com
 
Posts: n/a

Default Trigger - 03-06-2008 , 05:31 AM






create or replace trigger trg_i_au_clients
before insert on au_clients for each row
begin
select au_clients_seq.nextval into :new.id from dual;
end;

I have error "java.lang.IllegalArgumentException: No SQL selected for
execution.Position: 0".
Why can it be? Please help.

Reply With Quote
  #2  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: Trigger - 03-06-2008 , 01:13 PM






Bumsys (AT) gmail (DOT) com wrote:
Quote:
create or replace trigger trg_i_au_clients
before insert on au_clients for each row
begin
select au_clients_seq.nextval into :new.id from dual;
end;

I have error "java.lang.IllegalArgumentException: No SQL selected for
execution.Position: 0".
Why can it be? Please help.
Add a slash (/):

create or replace trigger trg_i_au_clients
before insert on au_clients for each row
begin
select au_clients_seq.nextval into :new.id from dual;
end;
/
--

Regards,
Frank van Bortel

Top-posting in UseNet newsgroups is one way to shut me up


Reply With Quote
  #3  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: Trigger - 03-06-2008 , 01:13 PM



Bumsys (AT) gmail (DOT) com wrote:
Quote:
create or replace trigger trg_i_au_clients
before insert on au_clients for each row
begin
select au_clients_seq.nextval into :new.id from dual;
end;

I have error "java.lang.IllegalArgumentException: No SQL selected for
execution.Position: 0".
Why can it be? Please help.
Add a slash (/):

create or replace trigger trg_i_au_clients
before insert on au_clients for each row
begin
select au_clients_seq.nextval into :new.id from dual;
end;
/
--

Regards,
Frank van Bortel

Top-posting in UseNet newsgroups is one way to shut me up


Reply With Quote
  #4  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: Trigger - 03-06-2008 , 01:13 PM



Bumsys (AT) gmail (DOT) com wrote:
Quote:
create or replace trigger trg_i_au_clients
before insert on au_clients for each row
begin
select au_clients_seq.nextval into :new.id from dual;
end;

I have error "java.lang.IllegalArgumentException: No SQL selected for
execution.Position: 0".
Why can it be? Please help.
Add a slash (/):

create or replace trigger trg_i_au_clients
before insert on au_clients for each row
begin
select au_clients_seq.nextval into :new.id from dual;
end;
/
--

Regards,
Frank van Bortel

Top-posting in UseNet newsgroups is one way to shut me up


Reply With Quote
  #5  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: Trigger - 03-06-2008 , 01:13 PM



Bumsys (AT) gmail (DOT) com wrote:
Quote:
create or replace trigger trg_i_au_clients
before insert on au_clients for each row
begin
select au_clients_seq.nextval into :new.id from dual;
end;

I have error "java.lang.IllegalArgumentException: No SQL selected for
execution.Position: 0".
Why can it be? Please help.
Add a slash (/):

create or replace trigger trg_i_au_clients
before insert on au_clients for each row
begin
select au_clients_seq.nextval into :new.id from dual;
end;
/
--

Regards,
Frank van Bortel

Top-posting in UseNet newsgroups is one way to shut me up


Reply With Quote
  #6  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: Trigger - 03-06-2008 , 01:13 PM



Bumsys (AT) gmail (DOT) com wrote:
Quote:
create or replace trigger trg_i_au_clients
before insert on au_clients for each row
begin
select au_clients_seq.nextval into :new.id from dual;
end;

I have error "java.lang.IllegalArgumentException: No SQL selected for
execution.Position: 0".
Why can it be? Please help.
Add a slash (/):

create or replace trigger trg_i_au_clients
before insert on au_clients for each row
begin
select au_clients_seq.nextval into :new.id from dual;
end;
/
--

Regards,
Frank van Bortel

Top-posting in UseNet newsgroups is one way to shut me up


Reply With Quote
  #7  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: Trigger - 03-06-2008 , 01:13 PM



Bumsys (AT) gmail (DOT) com wrote:
Quote:
create or replace trigger trg_i_au_clients
before insert on au_clients for each row
begin
select au_clients_seq.nextval into :new.id from dual;
end;

I have error "java.lang.IllegalArgumentException: No SQL selected for
execution.Position: 0".
Why can it be? Please help.
Add a slash (/):

create or replace trigger trg_i_au_clients
before insert on au_clients for each row
begin
select au_clients_seq.nextval into :new.id from dual;
end;
/
--

Regards,
Frank van Bortel

Top-posting in UseNet newsgroups is one way to shut me up


Reply With Quote
  #8  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: Trigger - 03-06-2008 , 01:13 PM



Bumsys (AT) gmail (DOT) com wrote:
Quote:
create or replace trigger trg_i_au_clients
before insert on au_clients for each row
begin
select au_clients_seq.nextval into :new.id from dual;
end;

I have error "java.lang.IllegalArgumentException: No SQL selected for
execution.Position: 0".
Why can it be? Please help.
Add a slash (/):

create or replace trigger trg_i_au_clients
before insert on au_clients for each row
begin
select au_clients_seq.nextval into :new.id from dual;
end;
/
--

Regards,
Frank van Bortel

Top-posting in UseNet newsgroups is one way to shut me up


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

Default Re: Trigger - 03-06-2008 , 01:14 PM



Bumsys (AT) gmail (DOT) com wrote:
Quote:
create or replace trigger trg_i_au_clients
before insert on au_clients for each row
begin
select au_clients_seq.nextval into :new.id from dual;
end;

I have error "java.lang.IllegalArgumentException: No SQL selected for
execution.Position: 0".
Why can it be? Please help.
The error has nothing to do with the trigger unless you have
corruption.

SELECT owner, object_type, COUNT(*)
FROM dba_objects
WHERE status = 'INVALID'
GROUP BY owner, object_type;

SELECT comp_name, version, status
FROM dba_registry;

What is in the alert log?

Your code works fine here though you should note that no column
should ever be named id. First because it violates database
basics ... what id? Person ID? Document ID? Passport ID? And
secondly because it is a reserved word in Oracle.

Learn this query:
SELECT keyword
FROM gv$reserved_word
WHERE keyword LIKE '%<your_string_here>%';
--
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
  #10  
Old   
DA Morgan
 
Posts: n/a

Default Re: Trigger - 03-06-2008 , 01:14 PM



Bumsys (AT) gmail (DOT) com wrote:
Quote:
create or replace trigger trg_i_au_clients
before insert on au_clients for each row
begin
select au_clients_seq.nextval into :new.id from dual;
end;

I have error "java.lang.IllegalArgumentException: No SQL selected for
execution.Position: 0".
Why can it be? Please help.
The error has nothing to do with the trigger unless you have
corruption.

SELECT owner, object_type, COUNT(*)
FROM dba_objects
WHERE status = 'INVALID'
GROUP BY owner, object_type;

SELECT comp_name, version, status
FROM dba_registry;

What is in the alert log?

Your code works fine here though you should note that no column
should ever be named id. First because it violates database
basics ... what id? Person ID? Document ID? Passport ID? And
secondly because it is a reserved word in Oracle.

Learn this query:
SELECT keyword
FROM gv$reserved_word
WHERE keyword LIKE '%<your_string_here>%';
--
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.