What are the challenges you face when working across database platforms? Take the survey

Argfile and regex assistance

GaryHampsonGaryHampson Posts: 19
edited February 11, 2005 1:25PM in SQL Compare Previous Versions

I've been enjoying using the command line interface of the Compare tool and it has been very helpful thus far, but I am having a little difficulty in the granularity of selecting objects to compare (or not to in this case).

Here is the argfile:
<?xml version="1.0"?>
    <include objecttype="Table"/>
    <exclude objecttype="Table" matches="t_rpt_rcn_"/>
    <exclude objecttype="Table" matches="t_temp_"/>

What I would like to do is now exclude all tables that start with "t_str_" with the exception of "t_str_dimension" and t_str_levels". I really don't want to have to explicitly exclude all 49 remaining tables.

Any ideas?

Gary Hampson


  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    edited February 11, 2005 1:39PM
    Hi Gary,

    Thanks for posting here. You should be able to get away with this rather easily. You can make a regular expression that matches the first part of the table but not the endings that you specify and put that in an exclude tag:
        <exclude objecttype="Table" matches="\[t_str_(?!dimension\]|levels\])"/>
  • Options
    That is wonderful!! Thanks again Brian.. You are the best!!
This discussion has been closed.