Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789

    Unanswered: stored procedure

    Hi all I have a stored procedure that when it executes the users see a report but I am getting error messages can anyone tell me whats wrong with it


    Code:
    CREATE  PROCEDURE GCEmplyRenewals
    AS
    SELECT DATEADD(day, -1, convert(char(7), dateadd(month, 25, [FINALSUIT]),120)+'-01'), TM#, LASTNAME, FIRSTNAME, FINALSUIT
    AS FirstRenewal
    FROM GOVEMPLYS

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Looks to me like you need one more close paren, like:
    Code:
    CREATE  PROCEDURE GCEmplyRenewals
    AS
    
    SELECT DATEADD(day, -1, convert(char(7)
    ,  dateadd(month, 25, [FINALSUIT]),120)+'-01'))
    ,  TM#, LASTNAME, FIRSTNAME, FINALSUIT
       AS FirstRenewal
       FROM GOVEMPLYS
    
    RETURN
    -PatP

  3. #3
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    You probably need to put TM# in []: [TM#]
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Quote Originally Posted by rdjabarov
    You probably need to put TM# in []: [TM#]
    Oops!

    -PatP

Posting Permissions

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