Excluding tables with names start with underscore

A SQL Server Management Studio add-in to source control your database in Subversion or Team Foundation Server.

Moderators: Chris Auckland, David Atkinson, sherr, PhilScrace, andy.campbell.smith

Excluding tables with names start with underscore

Postby eugef » Tue Jul 30, 2013 8:11 pm

Hello,

We have a naming convention in the company to name all physical temporary and backup tables with underscore (_). Examples: _CustomerTemp or _OrderBck.

I would like to exclude those tables from being pushed to source control (TFS), but when I setup filter rules "exclude if object name begins with _" all tables are excluded.

I tried SQL language approach and specified [_] as exclude value (exclude if object name begins with [_]) to replicate following SQL statement (below, which works), but it didn't work at all and all tables are included and pushed to Source control.

SELECT * FROM sysobjects
WHERE xtype='U' and name NOT LIKE '[_]%'

When I look at filter settings script it stays:

-- Table

Exclude where (@NAME LIKE '[_]%')

How do I exclude tables where names starts with _?

Please, advise.

Thank you,
Eugene.
eugef
 
Posts: 15
Joined: Wed May 29, 2013 10:17 pm

Postby Manfred.Castro » Thu Aug 01, 2013 9:27 pm

This is a known issue logged in our system under the internal reference number of SOC-3904.
Underscore is a wildcard character in one of the underlying expression parsers that we use here.
Unfortunately there is not currently a method to prevent the underscore from being treated as a wildcard.
There is an existing feature request you may want to vote for which would allow the underscore to be treated as a literal character.
http://redgate.uservoice.com/forums/390 ... rs-out-all
These forums are actively monitored by our development team and allow our users to request features and vote on them.
If a feature receives a significant amount of votes or is deemed to have merit development may include the feature in a future release.
Manfred Castro
Product Support
Red Gate Software
Manfred.Castro
 
Posts: 209
Joined: Mon Apr 23, 2012 2:49 pm

Postby eugef » Thu Aug 01, 2013 9:59 pm

Thank you. I added my votes for this feature to be added to a next release.
eugef
 
Posts: 15
Joined: Wed May 29, 2013 10:17 pm


Return to SQL Source Control 3

Who is online

Users browsing this forum: No registered users and 0 guests