473,387 Members | 1,590 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.

Unable to call the Procedure inside Trigger

I'm just a beginner in PL/SQL. I'm trying to call the TESTPROC procedure inside my TRIGGER. Here is my code:

CREATE TABLE FORTESTING
(
TestName VARCHAR(50) ,
);

CREATE OR REPLACE TRIGGER TESTTRIG
BEFORE INSERT ON FORTESTING
FOR EACH ROW
BEGIN
CALL TESTPROC();
END;
/

CREATE OR REPLACE PROCEDURE TESTPROC (name VARCHAR2)
AS
v_name FORTESTING.TestName%TYPE;

BEGIN
IF v_name := name THEN
DBMS_OUTPUT.PUT_LINE('Test Name ' || name || ' EXIST' );
END IF;
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.PUT_LINE ('Test Name ' || name || ' NOT FOUND');
END;
/

After checking the Trigger, i got the below error:
Error(2,10): PLS-00103: Encountered the symbol "TESTPROC" when expecting one of the following: := . ( @ % ; The symbol ":=" was substituted for "TESTPROC" to continue.

Can anyone tell me if my codes are correct and how to fix this error?

Thank you.
Sep 29 '17 #1
0 5135

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

Similar topics

13
by: Marcin Wasilewski | last post by:
Hi, How to call procedure, which is on SQL Server from Access using visual basic? Thanks, mw
1
by: simonZ | last post by:
How can I call sub from aspx page? If I have on aspx page grid view and I call procedure from item Template: <asp:GridView ... .... <ItemTemplate> <%# test()%> and in code behind:...
1
by: eRTIS SQL | last post by:
hi, I want to use a stored procedure inside a stored procedure simulteanously changing the database. this is my base store procedure alter PROCEDURE create_file @dbname sysname AS declare...
2
by: kaushikroy | last post by:
i m getting this error when i m executing a stored procedure Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32). can anyone help me out what exactly the...
2
by: sscheral | last post by:
can we use stored procedure inside trigger? if yes how
2
by: bandarisathish | last post by:
can we write a procedure inside the function? and the reverse?
5
kaleeswaran
by: kaleeswaran | last post by:
Hi! can i call the procedure inside the trigger?.... thank you, kaleeswaran
0
by: Kozy | last post by:
Hello everyone, I have a problem with a procedure that is calling another procedure. Pasting some code: INSERT INTO LOGGING.POTRDITEV_FAKTURE(A,B,C) VALUES(4, 'POTRDITEV_FAKTURE_DODATEK ZA...
0
by: sagarika panda | last post by:
In oracle pl/sql how can i call a procedure inside a function?
8
Ajay Bhalala
by: Ajay Bhalala | last post by:
I have one application in which I used one richtextbox and some buttons. I have 1 button named "Delete". I want to create delete command using the code. When the user clicked the "Delete"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.