Options

Excluding tables with names start with underscore

eugefeugef Posts: 17
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.

Comments

  • Options
    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
  • Options
    Thank you. I added my votes for this feature to be added to a next release.
Sign In or Register to comment.