Hi All! Hope you had a great summer! I was looking up the 'internets' for something and came across many people looking for a way to retrieve SQL Error Message based on an Error ID. Here's a quick solution - nothing outstanding; but good-to-know script! DECLARE @Error int DECLARE @ErrorMessage varchar(800) SET @Error = @@Error IF @Error 0 SET @ErrorMessage = isnull((select [text] from sys.messages where message_id = @Error),'Error. Details not found.') SELECT @Error as [Error ID], @ErrorMessage as [Error Message] GO Go Go Go. Execute. Regards! Please consider the environment before printing this blog! Go Green!
Two Plus One Is Us! Initially started out as a title for our family blog, it didn't take long to realize that when you blog, other person reads and a third person comments you essentially have a small group that is contributing to a meaningful discussion resulting in enrichment of minds and problem solving. That small group is Us.