Can I specify a WHERE clause using an XML arg file?

In the UI, there's a way to provide a WHERE clause to include only certain rows in a comparison. I am using the command line interface with a saved XML arg file and need to do the same. For example, I have:

<include>Table:\[SavedSearch\]</include>

but this table has mixed static/user data so I really just want to compare rows

WHERE IsPublic = 1

in case a developer adds more public, canned search definitions and wants to push those to production. Does anyone know the XML tag for this? Is there something like

<include>Table:\[SavedSearch\]<where>IsPublic = 1</where></include>

?

Thanks.

Comments

  • James BJames B Posts: 1,124 Silver 4
    Thanks for your query!
    Unfortunately this isn't supported right now.

    There is a workaround however: Create a comparison project in SQL Data Compare containing the databases you want to compare and any table mappings and WHERE clause, then right-click it, select 'locate on disk', and make a copy of the project file in another location on disk.

    Next, use SQLDataCompare.exe to run the project using the /pr argument. The command-line version of SQL Data Compare can use the where clause that you'd set in the project.

    I've checked at this end, and currently it looks like the WHERE clause will be supported in version 9 at some point, although this is subject to change of course.
    Systems Software Engineer

    Redgate Software

Sign In or Register to comment.