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

Parameterize where clause?

Is it possible to parameterize a where clause with a variable that is passed in when using the command line?

I'm using ROWVERSIONs in my tables for change detection and hence I'll want to be able to pass in a filter for something like WHERE Product.RowVersionNumber > @ProductRowVersion. Of course this will change every time I want to run the comparison, but it will dramatically speed up the process.


  • Options
    Eddie DEddie D Posts: 1,789 Rose Gold 5
    Hi, thank you for your forum post. If you need to specify the /source and /target switches sadly you cannot make use of the WHERE clause filter in a command line comparison. However, there is a workaround. If you use the GUI and save the project, you can then use the /project switch in place of the /source and /target switches. If the project file referenced has been configured with a WHERE clause, the clause will be included in the command line comparison.
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
Sign In or Register to comment.