Command Line Table wild card

JohnStevensBIJohnStevensBI Posts: 9
edited November 10, 2015 3:09PM in SQL Data Compare 11
When I use the following options in a command line execution to synchronize two databases, DataCompare synchronizes all tables beginning with the specified table name.

So for example this:
/Synchronize /Options:ucc,ctf /Include:Table:MyTable

will synchronize:
    MyTable MyTable1 MyTable2

The online command line documentation says nothing about wildcards. Is this the intended behavior? Is it possible to specify the only a single table?

JS

Comments

  • Anu DAnu D Posts: 876 Silver 3
    Hi John,


    Thanks for your post!

    As per our article:

    You must include the brackets ( [ ] ) in the string; if you specify the argument without the brackets, /Include:table:Product, the ProductCategory table is included because it contains the string Product. The full SQL Server table names are qualified by the owner name in SQL Server 2000, and the schema name in SQL Server 2005/2008, and include brackets. For example (in SQL Server 2000):
    dbo.Product
    dbo.ProductCategory
    and so on. Therefore, the brackets indicate that you are specifying the full table name. To include the owner (or schema) name in the regular expression, you would need also to escape the dot ( . ):
    /Include:table:[dbo] .[Product]

    Does this help?
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
  • Thank you for the clarification Anu.
    /Include:table:[Product]
    specifies that you want to compare only the table that has a name that includes the string [Product]

    Could this statement accurately be read as "only the table that has a name that equals the string [Product]"?
  • Anu DAnu D Posts: 876 Silver 3
    Yes! Have you tried this command? Does that work for you?
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
  • Yes, it does, and I am suggesting that the wording of the documentation changed from "includes" to "equals", as these have two different meanings and the second is more accurate.

    Thank you for your assistance.
Sign In or Register to comment.