Ms Sql Server Declare Variable In Function