473,387 Members | 1,420 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

CREATE TRIGGER odditiy

Hello,

I have some 'CREATE TRIGGER' definitions that work when cut/pasted
into SQL*Plus worksheet and execute separately but fail with a
'trigger created with compilation errors' when executed at the same
time. Neither works at all under Solaris sqlplus.

Does anyone see what the problem is?

create or replace trigger aut_itri
before insert on inbound
for each row
when (new.id is null)
begin
select auto_iseq.nextval into :new.id from dual;
end;

create or replace trigger aut_otri
before insert on outbound
for each row
when (new.id is null)
begin
select auto_oseq.nextval into :new.id from dual;
end;

Thanks,
Darren
Jul 19 '05 #1
1 4554
da***********@ericsson.com (Darren) wrote in message news:<7c**************************@posting.google. com>...
Hello,

I have some 'CREATE TRIGGER' definitions that work when cut/pasted
into SQL*Plus worksheet and execute separately but fail with a
'trigger created with compilation errors' when executed at the same
time. Neither works at all under Solaris sqlplus.

Does anyone see what the problem is?

create or replace trigger aut_itri
before insert on inbound
for each row
when (new.id is null)
begin
select auto_iseq.nextval into :new.id from dual;
end;

create or replace trigger aut_otri
before insert on outbound
for each row
when (new.id is null)
begin
select auto_oseq.nextval into :new.id from dual;
end;

Thanks,
Darren


Darren, the triggers are written in pl/sql and pl/sql contains
semicolons, which would normally end an SQL statement.

To execute the create trigger place a slahs, "/", in the first column
on the line immediately following each trigger definition.

HTH -- Mark D Powell --
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jack | last post by:
I created a trigger in the "source table" that will "feed" and second table. The trigger is as follows: CREATE TRIGGER ON dbo.FromUPS FOR INSERT AS Declare @Count int Select @Count =...
9
by: Lauren Quantrell | last post by:
Is there a way to create a text file (such as a Windows Notepad file) by using a trigger on a table? What I want to do is to send a row of information to a table where the table: tblFileData has...
1
by: efinney | last post by:
Hi, I'm a newbie to sql server and this may be a really dumb question for some you. I'm trying to find some examples of sql server triggers that will set columns (e.g. the created and modified...
1
by: Barbara Lindsey | last post by:
I am a postgres newbie. I am trying to create a trigger that will put a copy of a record into a backup table before update or delete. As I understand it, in order to do this I must have a...
0
by: Yogesh | last post by:
Hello Everyone I have to create Oracle tables in my application on the fly, which have an Autonumber field. So, everytime I create a table, I have to create a corresponding sequence and trigger...
1
by: sandi | last post by:
Please Advice... I need to create SqlServer2005 trigger from C# form. so all my trigger can re-create if i push one button on my app.... i need to know how i create and delete trigger from c#...
3
by: satish | last post by:
hi, CAn i have one trigger for both Update and Delete Delete Trigger --------------------- create Trigger on . for delete as begin insert into z_user_log select * from deleted end
1
by: Darren | last post by:
Hello, I have some 'CREATE TRIGGER' definitions that work when cut/pasted into SQL*Plus worksheet and execute separately but fail with a 'trigger created with compilation errors' when executed...
3
by: Andrea MF | last post by:
Hi all, i have a problem when creating a trigger on DB2 ver 7.2 on WINDOWS. I have two tables MOVIMAG and BARCODE, the trigge when INSERT INTO MOVIMAG will be UPDATE a MOVIMAG field BARCODE...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.