Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2010
    Posts
    19

    Question Unanswered: getdate function

    in sql stored procedure , what is this mean .
    getDate()-1000

    thanks

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    it means the same as it does outside stored procedures

    what happened when you tested it?

    just run this query --
    Code:
    SELECT GETDATE() + 1000 AS mydate
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Sep 2010
    Posts
    19
    ya i see ,
    it's just add 1000 day to the current date

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Not quite, today it means "Give me a random number" that currently happens to process as 1000 days from now. In future versions of SQL, this syntax is supposed to produce the error message that it ought to produce today.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

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