Competition: What’s your favorite Redgate tool? Enter now.

keywords as alias issues

ggeierggeier Posts: 30 Bronze 2
edited January 13, 2017 8:51AM in SQL Prompt
When using the "Format SQL" feature, it's failing/removing brackets when the alias is a SQL keyword.
select top 1  [start] = 'wwww', [end] = 'xxxx'
from sys.objects o

select top 1  'wwww' as 'start','xxxx' as 'end'
from sys.objects o

formats to:
select top 1  start = 'wwww', [end] = 'xxxx'
from sys.objects o;

select top 1  start = 'wwww',end = 'xxxx'
from sys.objects o;

Comments

Sign In or Register to comment.