DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: Can Someone help me with the logic for this Procedure

  1. #1
    Join Date
    Mar 2006
    Posts
    4

    Can Someone help me with the logic for this Procedure

    Ok, i know im suppose to create a procedure with 3 parms, i did that my problem is knowing what im suppose to do in my Anomyous block once this is created.

    Here are the instructions

    Procedure Rent_SP takes in 3 parms, id, member_id, and inv_id. It adds a new record to the rental table. It should also update the movie inv, which is movie_qty column of the movie table.

    Procedure return_sp takes in 2 parms, movie and member. Based on the indicated values it identifies rental record from the rental table and records date in the check_date column. It also needs to update movie inventory in the movie table.

    Any help with logic will help, thanks.

  2. #2
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,492

    Cool


    Homework?

    Try coding something yourself and we may help you debug.
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  3. #3
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    Quote Originally Posted by LKBrwn_DBA

    Homework?

    Try coding something yourself and we may help you debug.
    I believe that we have already helped you with this homework assignment. If you keep getting other people to do your work you will never learn. Code this in pieces. Get the first requirement and write code that will do this, and then add a little more. You should also look at PL/SQL Best Practices by Stephen Feuerstein. This will give you more concrete examples on writing good code.

  4. #4
    Join Date
    Jun 2005
    Location
    London, UK
    Posts
    159
    Quote Originally Posted by epsonC84
    Ok, i know im suppose to create a procedure with 3 parms, i did that my problem is knowing what im suppose to do in my Anomyous block once this is created.
    Since you have already created the procedure, why are you listing the processing requirements for it, and why is the title of the thread "Can Someone help me with the logic for this Procedure?"

    Do you want help in writing the procedure that you've already got, or in calling it from an anonymous block?

  5. #5
    Join Date
    Mar 2006
    Posts
    4
    Quote Originally Posted by WilliamR
    Since you have already created the procedure, why are you listing the processing requirements for it, and why is the title of the thread "Can Someone help me with the logic for this Procedure?"

    Do you want help in writing the procedure that you've already got, or in calling it from an anonymous block?

    Your right, i need help writing the block. Those are the instructions, and i have no clue how to start it

  6. #6
    Join Date
    Mar 2006
    Posts
    4
    Quote Originally Posted by gandolf989
    I believe that we have already helped you with this homework assignment. If you keep getting other people to do your work you will never learn. Code this in pieces. Get the first requirement and write code that will do this, and then add a little more. You should also look at PL/SQL Best Practices by Stephen Feuerstein. This will give you more concrete examples on writing good code.

    thanks for the book reference sir. I'll have to check it out.

  7. #7
    Join Date
    Jun 2005
    Location
    London, UK
    Posts
    159
    Code:
    BEGIN
        rent_sp(123, 456, 789);
        return_sp(456, 123);
    END;
    You may need to set up some test data (a member with ID = 123, etc).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width