How to align datatypes with spacing in a table, stored procedure, or variable declarations?
ggeier2
Posts: 10 Bronze 1
How can I align data types? For example, SQL Prompt currently formats this table as:
I'd like for it to format it as:
<div>create table dbo.some_table</div><div>(</div><div> some_id int identity(1, 1) primary key clustered</div><div> ,some_name varchar(128)</div><div> ,some_other_name varchar(1000)</div><div>)</div>
I'd like for it to format it as:
<div>create table dbo.aligned_table</div><div>(</div><div> some_id int identity(1, 1) primary key clustered</div><div> ,some_name varchar(128)</div><div> ,some_other_name varchar(1000)</div><div>)</div>
Is this possible?
edit: Not sure why the code isn't formatting properly after I published the question.
edit: Not sure why the code isn't formatting properly after I published the question.
Tagged:
Answers
Hi @ggeier2
Thank you for reaching out on the Redgate forums
Sorry that the formatting didn't come out as expected - I took your html code and believe the difference you outlined is the indentation of code within the parentheses?
---
If so it may be a case of editing the following setting in your style
Schema (DDL) > Indent parentheses contents
Example below with your sample code indented & un-indented
Is this the alignment change you were looking to make?