Writing a procedure
3 posters
Page 1 of 1
Writing a procedure
CREATE OR REPLACE PROCEDURE SERVICE_ALTER IS
IS
1_COUNT
BEGIN
@<SELECT COUNT(*) INTO 1_COUNT>
@FROM HR.HR_PA_EMP_PRIMARY_ASSIGNMENT;
+IF "1_COUNT < '90000'" THEN
+RAISE_APPLICATION_ERROR(FAILED IN MEETING THRESHOLD);
END;
/
this is the procedure i have in oracle 10g and keep getting this error:
2/1 PLS-00103: Encountered the symbol "IS" when expecting one of the following:
begin function pragma procedure subtype type <an identifier>
<a double-quoted delimited-identifier> current cursor delete
exists prior external language
I am not able to figure it out.
IS
1_COUNT
BEGIN
@<SELECT COUNT(*) INTO 1_COUNT>
@FROM HR.HR_PA_EMP_PRIMARY_ASSIGNMENT;
+IF "1_COUNT < '90000'" THEN
+RAISE_APPLICATION_ERROR(FAILED IN MEETING THRESHOLD);
END;
/
this is the procedure i have in oracle 10g and keep getting this error:
2/1 PLS-00103: Encountered the symbol "IS" when expecting one of the following:
begin function pragma procedure subtype type <an identifier>
<a double-quoted delimited-identifier> current cursor delete
exists prior external language
I am not able to figure it out.
varun- Posts : 5
Join date : 2011-09-28
Re: Writing a procedure
Its all wrong. Have you written an Oracle SP before?
You got "IS" in twice. I have no idea what the @ and + characters are there for, you didn't declare 1_count right, also I don't think you can have a name that starts with a number, and why is the IF condition in quotes and the error message you are trying to send isn't???
You got "IS" in twice. I have no idea what the @ and + characters are there for, you didn't declare 1_count right, also I don't think you can have a name that starts with a number, and why is the IF condition in quotes and the error message you are trying to send isn't???
Re: Writing a procedure
You have IS twice.
Should be:
create or replace procedure
()
as (or is)
local variable declaration
begin
code section
exceptions
end;
Should be:
create or replace procedure
(
as (or is)
local variable declaration
begin
code section
exceptions
end;
MTomasura- Posts : 4
Join date : 2011-10-12
Location : Scranton USA
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|