Can SQL Data Compare read a WHERE clause from a file?


I'm using SQL Data Compare 6 on Windows XP Pro.

I have a comparison project which utilizes the WHERE clause on one of our tables. The clause changes every day so I need to make changes to the project before running it. Is there any way to have the project read this WHERE clause from a file rather than me having to edit the project, then the WHERE clause every time I run it?

Thanks for any help.


  • Options
    The best way that I can think of to do this is to use SQL Toolkit and automate the comparison. This would allow you to programatically set the WHERE clause as per the contents of a file.

    Alternatively the project file (.sdc) contains readable xml and it may be possible to edit this directly rather than having to launch the UI each time. We don't support people doing this and the method is untested so it would perhaps be best to backup the file before any edits.

    Hope this helps
    Chris Spencer
    Test Engineer
    Red Gate
  • Options
    Alternatively if your WHERE clause is based on a date or something similar you could use standard SQL in the WHERE clause even calling a user defined function to get the value.
    datediff(dd, OrderDate, getdate()) > 10
    Or something similar.
    Richard Mitchell
    Project Manager
    Red Gate Software Ltd
Sign In or Register to comment.