Re: Trigger

From: DA Morgan <>
Date: Thu, 06 Mar 2008 11:14:48 -0800
Message-ID: <> wrote:
> create or replace trigger trg_i_au_clients
> before insert on au_clients for each row
> begin
> select au_clients_seq.nextval into 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 (replace x with u to respond)
Puget Sound Oracle Users Group
Received on Thu Mar 06 2008 - 20:14:48 CET

Original text of this message