Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4592472
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T22:32:39+00:00 2026-05-21T22:32:39+00:00

create or replace procedure UPD_DEP (dd_name in dept.dname%type, –department which has to be updated

  • 0
create or replace procedure UPD_DEP 
    (dd_name in dept.dname%type, --department which has to be updated
    d_name in dept.dname%type)   --name to which the first parameter has to be updated 
is 
abc_exception exception;
begin
if (dname<>dd_name) THEN
  raise abc_exception; 
end if;
update dept
set dname=d_name
where dname=dd_name;  
commit;
EXCEPTION
WHEN  abc_exception THEN
dbms_output.put_line('department not present which u want to be updated');
end upd_dep;

Error at line 9: PL/SQL: Statement ignored

  • 7 if (dname<>dd_name) THEN (line 7)
  • 8 raise abc_exception; (line 8)
  • 9 end if; (line 9)
  • 10 update dept (line 10)
  • 11 set dname=d_name (line 11)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T22:32:40+00:00Added an answer on May 21, 2026 at 10:32 pm

    In line 7, you reference dname as a variable, but there is no variable with that name. My first assumption was that you meant that to be d_name, the second parameter to the function, but that doesn’t make sense since you would then be skipping the update unless the two values were equal.

    Based on what you are doing in the exception handler, I guess that the if is an attempt to check for whether rows exist to be updated, and the dname is an effort to reference the actual column in the table. But you can’t just reference table columns in the middle of PL/SQL code at whim — how is the compiler supposed to understand this reference?

    Besides, the best way to check whether an update would affect any rows is to do it and test the result.

    create or replace procedure UPD_DEP
    (dd_name in dept.dname%type, --department which has to be updated
    d_name in dept.dname%type) --name to which the first parameter has to be updated
    is
    begin
    
    update dept
    set dname=d_name
    where dname=dd_name;
    
    if SQL%FOUND then
      commit;
    else
      dbms_output.put_line('department not present which u want to be updated');
    end if;
    
    end upd_dep;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

create or replace PROCEDURE XXB_RJT_HEADER_PROCEURE ( V_PROD_ID IN NUMBER, V_WARE_ID IN XXB_RJT_HEADER.WAREHOUSE_ID% TYPE, V_PAY_METH
I have created a procedure which is working CREATE OR REPLACE PROCEDURE INIT_ACTOR_QUOTES AS
Here is the procedure, CREATE OR REPLACE PROCEDURE provsnXmlCmprsn ( encyNo SAS_PRO_CTL.AGENCYNO%TYPE, period SAS_PRO_CTL.PERIODE%TYPE)
Actually i have created following procedure,which is working fine. CREATE or REPLACE PROCEDURE GET_NOS(
I developed a PL/SQL stored procedure which returns a sys_refcursor create or replace procedure
I have Oracle procedure which does the same work as following: create or replace
create or replace procedure createtables Authid current_user as begin execute immediate 'create table newcustomer
I have this stored procedure: CREATE OR REPLACE PROCEDURE LIQUIDACION_OBTENER ( p_Cuenta IN NUMBER,
I have this stored procedure for Oracle: create or replace procedure bns_saa_message_get() <--- PROBLEM
I create a simple type: create or replace TYPE SIMPLE_TYPE AS OBJECT (ID NUMBER(38),

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.