yes, exactly-- and also the field name also without expanding the db name
so,
SELECT [field1], [field2] FROM [Northwind].[dbo].[Customers]
The issue is inconsistency. Sql server enterprise manager generates the brackets, and sql prompt generates the brackets, but if I'm looking through old code they may not be on there. I have to do every search and replace twice because it may or may not have the brackets on there.
This is the exact feature I came on here to find out if sql refactor could this already and I just couldn't find it. Guess not. I second jroh's request.
This seems to be a popular request. I agree that it's slightly inconsistent that there is a "Always delimit identifiers" option that only works for script generation and not for the Lay Out feature.
I've put this on our internal wish list. Can I ask if anyone uses quoted delimeters or is this just square brackets?
For me, we are trying to delimit all of our database objects (databases, tables, schemas, columns) with square brackets. We don't use quoted delimiters.
Comments
SELECT * FROM Northwind.dbo.Customers
to:
SELECT * FROM [Northwind].[dbo].[Customers]
If so, this is the feature I am also looking for.
so,
SELECT [field1], [field2] FROM [Northwind].[dbo].[Customers]
The issue is inconsistency. Sql server enterprise manager generates the brackets, and sql prompt generates the brackets, but if I'm looking through old code they may not be on there. I have to do every search and replace twice because it may or may not have the brackets on there.
Thanks, James
I've put this on our internal wish list. Can I ask if anyone uses quoted delimeters or is this just square brackets?
Kind regards,
David Atkinson
Product Manager
Red Gate Software
Product Manager
Redgate Software