Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Posts
    2

    Unanswered: Need help with ADD_MONTHS function

    Assignment reads:

    In Procedure Builder, create a procedure named ADD_PROJ_MGR that receives input parameters of the project ID, a consultant ID, and a project duration (in months), and then uses these values to insert a new record into the PROJECT_CONSULTANT table. Use the current system date for the roll-on date, and use the ADD_MONTHS function to calculate the roll-off date. Initialize the project hours to zero.

    roll_on_date is a field in a table
    roll_off_date is a field in a table

    Thanks for any assistance you can provide.

    this assignment is from Chapter 5 Lesson B Problem-Solving cases
    Advance PL/SQL Programming

  2. #2
    Join Date
    Oct 2003
    Location
    Dallas
    Posts
    76

    example

    you can try this....


    declare @roll_on_date as datetime
    declare @roll_off_date as int

    set @roll_on_date= getdate()
    set @roll_off_date= '1'


    SELECT DATEADD(month, @roll_off_date, @roll_on_date) AS end_date

  3. #3
    Join Date
    Nov 2003
    Posts
    2

Posting Permissions

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