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

  • SEARCH
  • Home
  • 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 8955789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:37:55+00:00 2026-06-15T14:37:55+00:00

I am trying to create a procedure which updates a transaction table according to

  • 0

I am trying to create a procedure which updates a transaction table according to the transaction type… but i am unable to correct the error: PL/SQL: Statement ignored
My code is :

create or replace procedure proc(acn transaction.acctno%TYPE, tt transaction.transtype%TYPE, amt transaction.amount%TYPE, bal transaction.balance%TYPE, dt transaction.dot%TYPE)
IS
ano transaction.acctno%TYPE;
ba transaction.balance%TYPE;
BEGIN
select acctno,balance into ano,bno from transaction where accctno=acn;
if tt='W' and bno>500 
then
update transaction set balance=balance-amt;
elsif tt='D'
then
update transaction set balance=balance+amt;
else
dbms_output.put_line('Insufficient balance');
end if;
END;

full error:

ERROR at line 7: PL/SQL: Statement ignored

5. BEGIN
6. select acctno,balance into ano,bno from transaction where accctno=acn;
7. if tt='W' and bno>500 
8. then
9. update transaction set balance=balance-amt;
  • 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-06-15T14:37:56+00:00Added an answer on June 15, 2026 at 2:37 pm

    I first thought that the error is because your table name is transaction which is a reserved word:

    select * from v$reserved_words where lower(keyword) = 'transaction';
    

    This is not the case however. But it seemst that the variable bno into which you want to select is not declared. You have, however, declared another variable ba transaction.balance%TYPE;. Proboably, you should update the variable name either in the declaration or in the statement so that both are the same.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create a stored procedure in SQL Server 2008 which can
I am trying to create a sybase stored procedure which references a temp table,
I'm trying to create a simple stored procedure which queries a sys.tables table. CREATE
I'm trying to create DB2 trigger which is using the procedure VOTES_COUNT but when
I am trying to create a procedure which will fill up the table until
i am trying to create sql procedure or function that need to find duplicate
I am trying to create a CLR procedure to export SQL data to Excel
I'm trying to create table from view from remote server (calling procedure UPDATE_PROC), like
I have an already existing stored procedure. But when I am trying to create
I'm trying to create a procedure which extracts data from a MySQL server (using

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.