suggestion: delimit identifiers

Refactors and formats SQL code.

Moderators: Chris Auckland, David Atkinson, Anu Deshpande, Luke Jefferson

suggestion: delimit identifiers

Postby jroh » Wed Mar 18, 2009 8:35 pm

It would be nice to have a way to delimit existing identifiers, without having to qualify the object name.

Thanks, J
jroh
 
Posts: 10
Joined: Thu Aug 21, 2008 4:15 pm

Postby Linda Hawksworth » Mon Mar 23, 2009 3:19 pm

I have logged your feature request in our tracking system (SR-839). I have put a watch on it so that I am informed if/when the status of it changes.
Linda Hawksworth
 
Posts: 192
Joined: Mon Jun 25, 2007 11:32 am

thank you!

Postby jroh » Fri Mar 27, 2009 1:46 pm

thank you!
jroh
 
Posts: 10
Joined: Thu Aug 21, 2008 4:15 pm

Postby dslinn@gms.ca » Wed Apr 01, 2009 12:36 am

By this request, do you mean that you want SQL Refactor to change:

SELECT * FROM Northwind.dbo.Customers

to:

SELECT * FROM [Northwind].[dbo].[Customers]

If so, this is the feature I am also looking for.
dslinn@gms.ca
 
Posts: 7
Joined: Wed Apr 01, 2009 12:28 am

suggestion: delimit identifiers

Postby jroh » Wed Apr 01, 2009 1:30 pm

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.

Thanks, James
jroh
 
Posts: 10
Joined: Thu Aug 21, 2008 4:15 pm

Postby dslinn@gms.ca » Thu Apr 02, 2009 12:27 am

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.
dslinn@gms.ca
 
Posts: 7
Joined: Wed Apr 01, 2009 12:28 am

Postby David Atkinson » Thu Apr 02, 2009 9:05 am

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?

Kind regards,

David Atkinson
Product Manager
Red Gate Software
Last edited by David Atkinson on Fri Apr 03, 2009 2:42 pm, edited 1 time in total.
David Atkinson
 
Posts: 1124
Joined: Mon Dec 05, 2005 4:54 pm
Location: Twitter: @dtabase

Postby dslinn@gms.ca » Fri Apr 03, 2009 12:43 am

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.
dslinn@gms.ca
 
Posts: 7
Joined: Wed Apr 01, 2009 12:28 am


Return to SQL Refactor 1

Who is online

Users browsing this forum: No registered users and 0 guests