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 8963595
In Process

The Archive Base Latest Questions

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

I am trying to lay the foundation for a package but am having trouble

  • 0

I am trying to lay the foundation for a package but am having trouble even getting started. I have successfully created a basic package spec and want to just test the package body but I’m having trouble getting it to compile. The spec code is:

CREATE OR REPLACE PACKAGE synchronize_my_data 
AS
  PROCEDURE synchronize_data(p_run_date IN date);
END synchronize_my_data;

and here is the package body code:

CREATE OR REPLACE PACKAGE BODY synchronize_my_data 
IS
  PROCEDURE synchronize_data(p_run_date IN date) IS
      PROCEDURE process_deletes(p_run_date IN date) IS
      BEGIN
          dbms_output.put_line('Run Date: ' || to_char(p_run_date, 'MM/DD/YYYY'));      
      END process_deletes;
  BEGIN
    process_deletes(p_run_date);
  END synchronize_data;

END synchronize_my_data;

I keep getting a compilation error but can’t figure out what’s wrong with the code. It seems like basic code, am I just missing something obvious?

  • 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-15T16:23:38+00:00Added an answer on June 15, 2026 at 4:23 pm

    That code seems to compile for me. What error are you getting?

    SQL> CREATE OR REPLACE PACKAGE synchronize_my_data
      2  AS
      3    PROCEDURE synchronize_data(p_run_date IN date);
      4  END synchronize_my_data;
      5  /
    
    Package created.
    
    SQL> CREATE OR REPLACE PACKAGE BODY synchronize_my_data
      2  IS
      3    PROCEDURE synchronize_data(p_run_date IN date) IS
      4        PROCEDURE process_deletes(p_run_date IN date) IS
      5        BEGIN
      6            dbms_output.put_line('Run Date: ' || to_char(p_run_date, 'MM/DD/YYYY'));
      7        END process_deletes;
      8    BEGIN
      9      process_deletes(p_run_date);
     10    END synchronize_data;
     11
     12  END synchronize_my_data;
     13  /
    
    Package body created.
    

    From a general stylistic standpoint, it generally makes very little sense to define a procedure within another procedure in a package body. One of the benefits of using packages is that you can have both public and private procedures. You can create the process_deletes procedure as a private procedure simply by defining it in the body without defining it in the spec.

    CREATE OR REPLACE PACKAGE BODY synchronize_my_data 
    IS
      PROCEDURE process_deletes(p_run_date IN date) 
      IS
      BEGIN
          dbms_output.put_line('Run Date: ' || to_char(p_run_date, 'MM/DD/YYYY'));      
      END process_deletes;
    
      PROCEDURE synchronize_data(p_run_date IN date) 
      IS
      BEGIN
        process_deletes(p_run_date);
      END synchronize_data;
    
    END synchronize_my_data;
    

    That shouldn’t have anything to do with whatever error you’re getting. But it should make your code easier to deal with.

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

Sidebar

Related Questions

I have a webpage in asp.net that I am trying to lay out and
I have been trying to fix this problem but not been able to do
Sorry for the somewhat boring question, but I am trying to lay out buttons
I am trying to lay out objects on a Storyboard using the interface builder
First I'll lay out what I'm trying to achieve in case there's a different
trying to figure out why this is happening - I have an input text
I am trying to lay out a table-like page with two columns. I want
I am trying to lay out a web application and running into problems with
I'm trying to lay out a web page like this: |-----------------------| | header (fixed)
I am trying to lay buttons on top of a background image for a

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.