Bumsys@[EMAIL PROTECTED]
wrote:
> 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? Do***ent ID? Pass****t 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 Wa****ngton
damorgan@[EMAIL PROTECTED]
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


|