Declare

  • declare @EndDate dateTime;

    select max(Date) as D1 from Table1;

    set @EndDate = D1

    When I am executing this I am getting error

    "Invalid column name 'D1'."

    Whats wrong ?

     

  • SELECT @EndDate = MAX([Date])

    FROM Table1;



    --Jonathan

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

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