Filtering Out Object With Underscore
eyeonit
Posts: 5
Hello there,
I've got a question. It seems an underscore in the name is throwing off the filter within SQL Compare Pro 11. Is there a way of filtering out a stored procedure with the name of _NameOfStoreProcedure? We've got a handful of objects with a leading underscore in the name and I'd like to filter out a few of them.
Any help would be much appreciated. I've searched high and low and only found these posts. I tried the second link but it didn't work.
https://forums.red-gate.com/viewtopic.php?f=177&t=78977&p=139684&hilit=underscore#p139684
https://forums.red-gate.com/viewtopic.php?t=21805
If I'm missing something I do apologize.
I've got a question. It seems an underscore in the name is throwing off the filter within SQL Compare Pro 11. Is there a way of filtering out a stored procedure with the name of _NameOfStoreProcedure? We've got a handful of objects with a leading underscore in the name and I'd like to filter out a few of them.
Any help would be much appreciated. I've searched high and low and only found these posts. I tried the second link but it didn't work.
https://forums.red-gate.com/viewtopic.php?f=177&t=78977&p=139684&hilit=underscore#p139684
https://forums.red-gate.com/viewtopic.php?t=21805
If I'm missing something I do apologize.
Comments
Redgate Software
Hello Mike,
I'm currently on version 11.3.0.7. I've tried everything and can't get some stored procedures excluded. They are with an underscore like this. _NameOfStoredProcedure. I'm currently using the operator LIKE.
Here's the XML.
<StoredProcedure version="1">
<Include>False</Include>
<Expression>((@NAME LIKE '_NameOfStoredProcedure') AND (@NAME LIKE '_NameOfStoredProcedure2'))</Expression>
This is probably what you want:
Redgate Software
I kept trying different things and finally got it working!!! What I did was modify the filter and used EQUAL instead of LIKE.
Thank for you the quick replies. I really appreciate it.
Here's what the final XML looks like.
<Include>False</Include>
<Expression>(@NAME = '_NameOfStoredProcedure') OR (@NAME = '_NameOfStoredProcedure2')</Expression>
Thanks Mike!!
I actually wasn't editing the XML. I'm using the UI and was just referencing the XML so others could see what it looked like.
It's working now. Thanks again.