Error msg in Sql can't see it

  • Hey Guys I'm getting a msg:Incorrect syntax near '('.

    on the following code

    Set @P_Amt (Select Sum(Cast(P_Amount as Numeric)) FROM tblArchive

    Where RunDate >= @First_Day_Prev_Month

    AND RunDate <= @Last_Day_Prev_Month)

    Can anyone see what I'm missing?

  • Set @P_Amt = (Select Sum(Cast(P_Amount as Numeric)) FROM tblArchive Where RunDate >= @First_Day_Prev_Month AND RunDate <= @Last_Day_Prev_Month)

  • Even Stevie Wonder would be ashamed of mssing that one.

    Thanx much, seems I can't see for looking!

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

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