How can we help you today? How can we help you today?

Remove Unnecessary Square Brackets Exceptions

Is there a way to have the "Remove unnecessary square brackets" feature to ignore brackets around keywords?

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.
ggeier
0

Comments

2 comments

  • Aaron L
    Hi ggeier,

    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.
    Aaron L
    0
  • ggeier
    That uservoice is exactly what I mean. I voted for it, thanks.
    ggeier
    0

Add comment

Please sign in to leave a comment.