Posts
Sort by recent activity
Spaces between
Hi !The following code is formatted with a lot of spaces between[code]ALTER TABLE mdm.Synchronization_StatusADD CONSTRAINT PKCL_Synchronization_Status_synchronization_timestamp PRIMARY KEY ...
Variables are never used
Hi Redgate Team,The code analysis reports that the variables are never used but obviously it is not the case.DECLARE @inaccessible nvarchar(12), @invalidlogin nvarchar(12), @dbinaccess...
CASE
Hi Redgate Team,SQL Prompt formats the following code like below:SET @sql = N'SELECT name FROM sys.databases WHERE 1=1' + CASE WHEN @system_only = 1 THEN ' AND database_id IN (1,2,3,4)' ELSE ...
Wrapping not working
Hi Redgate Team,
the following statement is longer than 80 chars but even so wrapping is not working.CREATE TABLE on_disk_table ( col1 integer NOT NULL IDENTITY, col2 char(8000) NOT NULL );I set W...
Alignment
Hi Redgate Team,SQL Prompt will format the follow code like this :[code]SELECT *FROM tfuWHERE tfu.TYPE_FUNCTION_NAME IN (N'RESOURCES', N'BUSINESSES', N'ENVIRONMENTS' ...
Case Format
Hi !The following code is formatted like this
[code] co2.COMPONENT_ID, co2.COMPONENT_TYPE, CASE WHEN co2.COMPONENT_TYPE <> 21 THEN NULL ELSE co2.PARENT_ID END AS PARENT_IDFROM SENTOSA...
Alignment
Hi Redgate Team,SQL Prompt will not align the Unique Constraint columns:[code]CREATE TABLE #t( L int NOT NULL, ELEMENT_NAME nvarchar(150) NOT NULL UNIQUE ...
Alignment
Hi Redgate Team.SQL prompts will format the code like this:Style : comma before [code]select *from tabwhere col in ( -- xyz N'26544b76-162a-47cc-89a0-4626388b5727' ...
Formatting fails
Hi Redgate TeamHighlighting the first command only to format just this statement will fail cause Redgate already is trying to parse the second statement as well.This behavior is different to the fo...
CASE
Hi Redgate Team,[code]SELECT CASE WHEN stp.rows = 0 THEN 1 WHEN stp.rows = 0 THEN 1 WHEN stp.rows > 0 AND stp.rows <= 500 THEN 501 WHEN stp.rows > ...