473,240 Members | 1,439 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,240 software developers and data experts.

trigger compilation errror

19
what is wrong with this code? y it is coming with compilation error?

Expand|Select|Wrap|Line Numbers
  1. create or replace trigger insert_error before insert or update on trig 
  2.              for each row
  3.              declare
  4.                no1 trig.no%type;
  5.               begin
  6.               no1:=:new.no;
  7.               if no1<=100 then
  8.              raise_application_error(-2001,‘number less than 100 is not allowed');
  9.              end if ;
  10.              end;
  11.  
  12. Warning: Trigger created with compilation errors.
  13.  
  14.  
May 6 '08 #1
3 3049
amitpatel66
2,367 Expert 2GB
what is wrong with this code? y it is coming with compilation error?

[code]
create or replace trigger insert_error before insert or update on trig
for each row
declare
no1 trig.no%type;
begin
no1:=:new.no;
if no1<=100 then
raise_application_error(-2001,‘number less than 100 is not allowed');
end if ;
end;

Warning: Trigger created with compilation errors.

[code]
Post the error here for reference using the below command after running your code:

Expand|Select|Wrap|Line Numbers
  1.  
  2. SQL> show error
  3.  
  4.  
May 7 '08 #2
jaanutn
19
Post the error here for reference using the below command after running your code:

Expand|Select|Wrap|Line Numbers
  1.  
  2. SQL> show error
  3.  
  4.  

SQL> show error;
Errors for TRIGGER INSERT_ERROR:

LINE/COL ERROR
-------- -----------------------------------------------------------------
6/31 PLS-00103: Encountered the symbol "?" when expecting one of the
following:
( - + mod not null others <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql stddev sum variance
execute cast trim forall
<a string literal with character set specification>
<a number> <a single-quoted SQL string>
May 7 '08 #3
debasisdas
8,127 Expert 4TB
Check your code and remove the character as mentioned in the error message.
May 7 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

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...
6
by: Scott CM | last post by:
I have a multi-part question regarding trigger performance. First of all, is there performance gain from issuing the following within a trigger: SELECT PrimaryKeyColumn FROM INSERTED opposed...
0
by: JohnO | last post by:
Thanks to Serge and MarkB for recent tips and suggestions. Ive rolled together a few stored procedures to assist with creating audit triggers automagically. Hope someone finds this as useful as...
1
by: deepdata | last post by:
Hi, I am creating a trigger in DB2 express version. When i use the following syntax to create trigger CREATE TRIGGER USER_PK_TRIGGER BEFORE INSERT On users REFERENCING NEW As N FOR EACH...
6
by: ImageAnalyst | last post by:
Try this: 1) In the code editor, double click some word. 2) Type control-F to bring up the search window. 3) Set the "Look in" drop down box to be "Entire Solution" 4) Click the "Bookmark All"...
5
by: shethsheetal | last post by:
I am having some problem with the below mentioned trigger. CREATE TRIGGER D.TBA AFTER UPDATE OF TBAA.CIC ON TBAA REFERENCING NEW AS NEW_ROW FOR EACH ROW MODE DB2SQL BEGIN ATOMIC DECLARE RS...
9
by: Ots | last post by:
I'm using SQL 2000, which is integrated with a VB.NET 2003 app. I have an Audit trigger that logs changes to tables. I want to apply this trigger to many different tables. It's the same trigger,...
1
by: umesh049 | last post by:
hello I want to update in one trigger the tables in to another schema but it doesn't work but when i select data from sql prompt it works fine. can any body help me. thanks. CREATE OR...
11
by: tracy | last post by:
Hi, I really need help. I run this script and error message appeal as below: drop trigger log_errors_trig; drop trigger log_errors_trig ERROR at line 1: ORA04080: trigger 'LOG_ERRORS-TRIG'...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.