Remove Unnecessary Square Brackets Exceptions
ggeier
Posts: 30 Bronze 2
Is there a way to have the "Remove unnecessary square brackets" feature to ignore brackets around keywords?
For example, if I had this query:
I would like it to be formatted like this:
It's currently being formatted as this:
Thanks.
For example, if I had this query:
select f.[katy_perry_id] ,f.[name] ,f.[definition] ,f.[tswift_id] ,f.[is_awesome] from [stars].[katy_perry] f
I would like it to be formatted like this:
select f.katy_perry_id ,f.[name] ,f.tswift_id ,f.is_awesome from stars.katy_perry f
It's currently being formatted as this:
select f.katy_perry_id ,f.name ,f.tswift_id ,f.is_awesome from stars.katy_perry f
Thanks.
Comments
Unfortunately at the moment SQL Prompt doesn't have a setting to achieve what you want. As [name] isn't a full keyword the brackets are unnecessary. If you had a column named with a full keyword like or [select] however then the brackets would be necessary and kept.
I think we've got a UserVoice request for improving this here: https://redgate.uservoice.com/forums/94 ... ssary-brac
If that's what you're thinking of please do add your vote! We use the votes to help prioritise what will be worked on next and you'll get an email when we release a new build with it in.
Thanks,
Aaron.