Noobie Question: GetDate() in UDF

  • Hi everybody,

    I always thought that

    1) non-deterministic functions weren't allowed in user-defined functions

    2) Getdate() is non-deterministic

    3) Therefore I shouldn't be able to use it in a function,

    but this compiles just fine:

    create function dbo.bbb ()

    returns datetime

    as

    begin

    return getdate();

    end;

    What am I not seeing here? 😛

    Thanks!

  • Welcome to 2k5 +.

    It was still like you expected in 2000.

  • Yeah, I noticed this "improvement" in 2005, but I couldn't find any documentation as to why this suddenly "works". I haven't taken the time to test other such functions...

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply