IF statement format options
Please provide the option to format IF statements as follows, based on the format settings sample.
IF @productType IN ('a', 'b', 'd', 'g', 'i', 'O', 'Q', 'X', 'Z') BEGIN
----IF @cost <= @compareprice BEGIN
--------PRINT 'Less than $' + CAST(@compareprice AS varchar(20))
----END ELSE BEGIN
--------PRINT 'Exceeds $' + CAST(@compareprice AS varchar(20))
----END
END
We’ve released a brand new formatting system in version 8 of SQL Prompt and have made further improvements since.
You can get the latest version of SQL Prompt from https://www.red-gate.com/products/sql-development/sql-prompt/.
If there is something missing please let us know by opening a new suggestion.
Kind regards,
The Prompt Team
-
Lee Robinson commented
Doesn't this hide the structure and make the code hard to read?