Format SQL does not work on sql containing 'exec @my_var=my_procedure'
Example:
When having the following procedure:
ALTER PROCEDURE [dbo].[Foo001] @var001 NVARCHAR (38)AS BEGIN DECLARE @outvar01 NVARCHAR(38)BEGIN TRY DECLARE @OperationLevel INT DECLARE @outvar02 NVARCHAR (64)exec @OperationLevel=my_procedure @outvar01 output,@outvar02 output/* do some stuff */END TRY BEGIN CATCH/* do some error hand ling */END CATCH END
it will not be formatted and no error code is given.
WORKAROUND:
It can help commenting in parts of the code, then it should be formatted correctly, afterwards uncomment the code again.
STATUS:
Waiting for a fix to be released in a future version of Toad for SQL Server.