Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Oracle Tools > Re: Trigger
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 4 Topic 2719 of 2833
Post > Topic >>

Re: Trigger

by DA Morgan <damorgan@[EMAIL PROTECTED] > Mar 6, 2008 at 11:14 AM

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
 




 4 Posts in Topic:
Trigger
Bumsys@[EMAIL PROTECTED]   2008-03-06 03:31:30 
Re: Trigger
Frank van Bortel <fran  2008-03-06 20:13:00 
Re: Trigger
DA Morgan <damorgan@[E  2008-03-06 11:14:48 
Re: Trigger
"Shakespeare" &  2008-03-07 14:16:16 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Dec 2 19:43:48 CST 2008.