1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Packet in pl/sql need help

Discussion in 'SQL PL/SQL' started by VICENTINI, Jun 6, 2013.

  1. VICENTINI

    VICENTINI Guest

    hello, my problem is related to oracle packages, I need to know how to package functions and procedures, I'm desperate, so they sent me to do is complicated, is to make a packet by calculating the area and volume of a cube, I would just like to know the procedure. thank you very much in advance.
     
  2. DTSIGuy

    DTSIGuy Forum Advisor

    Messages:
    402
    Likes Received:
    58
    Trophy Points:
    410
    Location:
    Texas
    You CREATE a PACKAGE (aka package spec). In the package spec you declare the FUNCTIONS and PROCEDURES that are accessible via the PACKAGE. Then you CREATE the PACKAGE BODY. Within the package body you define the functions and procedures as they were declared in the package spec.

    As to why you need a package...that is not clear from your post. You do not necessarily need a package or a procedure or a function to simply calculate the volume of a cube. Unless this is an exercise and the requirement IS to calculate the volume of a cube utilizing those specific PL/SQL objects.

    HTH

    CJ
     
  3. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    This is homework, which is why the package is necessary. The instructor wants the students to use what was just taught.
     
  4. DTSIGuy

    DTSIGuy Forum Advisor

    Messages:
    402
    Likes Received:
    58
    Trophy Points:
    410
    Location:
    Texas
    Figured as much... :)