Toad World® Forums

parameter in Where clause in Data Compare

Is it possible to include a parameter in the Source Where clause and Target Where clause in a “Compare” module? I tried the ‘:’ and ‘#*#’ way of introducing a parameter/variable but neither were accepted. I’m trying to create an automation with a “Compare” module that is looped, generating a compare report per loop-cycle.

Hi,

Unfortunately there is no easy way how to do this because Data compare doesn’t support variable.

But there is workaround how to do this. Data Compare file using standard XML file format and all needed information are saved here. You can edit your .dcp file in some text editor and you can change value for attribute CustomFilterTarget or CustomFilterSource for each pair object. Replace your real value by some variable like ‘@parameter’. Then in your automation you can combine set variable activity and find and replace activity and modify this variable to specific value before you will use data compare activity.

Hope it helped

Filip

Thanks, this seems to be working