Using Underscores in a filter
chadhattabaugh
Posts: 19
We rename tables with "_" before we physically remove them.
Is there a way to specify an underscore without it being interpreted as a wildcard?
Is there a way to specify an underscore without it being interpreted as a wildcard?
Comments
Unfortunately there's no easy way to do this, but I just came up with a workaround.
If you create a filter rule for excluding objects starting with '_', then save the filter, that will actually create a filter file located in "%userprofile%\Documents\SQL Compare\Filters". If you open up that file in notepad, you'll see a statement like the following:
You can manually modify that to look like this:
Then save the filter file.
Once the filter file is saved, go back into SQL Compare, open up the filter dropdown, and select "open filter from file". Load the file you just modified and it should now filter out all objects starting with '_'.
Hope that helps.
Thanks,
Evan
Product Support
(866) 627-8107
<Expression>(@NAME LIKE '\_%%' ESCAPE '\')</Expression>
I just got this to work with SQL Source Control. You have to modify the DifferenceFilters.xml file in "%userprofile%\AppData\Local\Red Gate\SQL Source Control 3". For some reason this doesn't apply right away (there might be some sort of cache), but if you close and open SSMS it seems to work.
Hope that helps.
Thanks,
Evan
Product Support
(866) 627-8107
Product Support
(866) 627-8107