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

Can i use a where clause using command line?

dbdmoradbdmora Posts: 50
edited August 28, 2014 7:05AM in SQL Data Compare Previous Versions
I want to automate a data compare of two tables but I need to put in a where clause, I could not find an option in the documentation where I can add a where clause when comparing a table via command line. Is this possible?

Ideally, I would like to update a text file with what my where clause variables would be and sqldatacompare would read it when I run it via command line.


  • Options

    Thanks for your post.

    Unfortunately it's not possible to use a where clause with a command line switch directly, but you can save a project file in the UI with a where clause defined and use the /project switch to reference it.

    I'll also log this in our existing feature request (reference SDC-718).

    Evan Moss
    Product Support
    (866) 627-8107
  • Options
    dsheerindsheerin Posts: 7 Bronze 2
    This functionality would also be very useful for me and my organization. We have multiple geographically disbursed databases that contain a subset of data that is replicated to a central database. I need to automate the comparison of the these databases with the central database. The data is stored in tables with a geographic source indicator. I need to filter for this in the command line. This value will need to be changed as I go through the process of comparing the distributed databases one at a time to the central database. I do not think it is possible to alter a project file on the fly prior to running a comparison. There are 100 distributed databases with nearly 400 tables. There are way too many potential options to create a separate project file for each potential circumstance. Thanks.
  • Options
    One idea would be to modify the contents of the project file on the fly as it's just xml. However, as this isn't a supported way of doing it, it's something you'd have to experiment with yourself.
    David Atkinson
    Product Manager
    Redgate Software
  • Options
    p_r_kellyp_r_kelly Posts: 6 New member
    Is this still the case with Data Compare v13?
  • Options
    Jessica RJessica R Posts: 1,319 Rose Gold 4
    @p_r_kelly It is still the case, I'm sorry to say. :/ I'll update the request SDC-718 to show that you've followed up on this, but can you also kindly add a request for it to our UserVoice forum here -
    - https://redgate.uservoice.com/forums/147879-sql-data-compare? That's the best place to add feature requests as our developers use it when considering new features, and it also allows other users to vote on the same requests.

    Thank you!

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?

Sign In or Register to comment.