Multiple compares on same table

Multiple compares on same table

Postby rand0m » Tue 23 Nov 2010 01:09

Sorry I'm very new to dbForge Data Compare for Oracle.

I am attempting to add multiple compare objects on the same table and can't figure out if its 1) possible 2) something i'm doing wrong.

Example:

Table ABC has columns COLUMN1, COLUMN2
Say COLUMN1 has string values Value1a, Value1b, Value1c
COLUMN2 has numeric values that I wish to compare.

I have setup a data compare object which compares:
Table ABC.COLUMN2 <-> Table ABC.COLUMN2
WHERE
COLUMN1 = 'Value1a' in the source AND
WHERE
COLUMN1 = 'Value1b' in the target

This works fine.

But then I now want to add another compare object which compares:
Table ABC.COLUMN2 <-> Table ABC.COLUMN2
WHERE
COLUMN1 = 'Value1b' in the source AND
COLUMN1 = 'Value1c' in the target

I'm not able to find a way to add multiple comparisons on the same schema/table. It forces me to use a second project. The reason I'd like these in the same project is so I can see them on the same report.

Thanks in advance.
rand0m
 
Posts: 3
Joined: Tue 23 Nov 2010 00:53

Postby .jp » Tue 23 Nov 2010 15:25

As far as I understand, you want to compare the same table twice in one project and in one schema, but with different conditions for rows selection, don't you?
.jp
Devart Team
 
Posts: 303
Joined: Wed 09 Sep 2009 06:55
Location: devart

Postby rand0m » Tue 23 Nov 2010 22:18

Yes that's correct. What would be the easiest method?

Thanks in advance.
rand0m
 
Posts: 3
Joined: Tue 23 Nov 2010 00:53

Postby .jp » Wed 24 Nov 2010 15:39

rand0m wrote:Yes that's correct. What would be the easiest method?

Thanks in advance.


Unfortunately during one comparison a table may be used only once. That's why if your conditions for selection change, you will have to perform the comparison process corresponding number of times.
But if you are using a fully-functional version (not Express Edition), there is a workaround. The first comparison we leave unchanged, and create a couple of views for the second one:

for SOURCE:
Code: Select all
CREATE VIEW
AS
SELECT *
FROM ABC
COLUMN1 = 'Value1b';


for TARGET:
Code: Select all
CREATE VIEW
AS
SELECT *
FROM ABC
COLUMN1 = 'Value1c';


If your SOURCE and TARGET are on different servers, but have schemas with the same name, you should give identical names to the views - in this case automapping will work.
And you should perform the following steps:
1) Check the "Compare view" option on the Options page of the Synchronization wizard.
You should perform the steps described below if the names of your views are different.
2) On the Mapping page of the Synchronization wizard you should select and , and press UNMAP on the toolbar. If servers are different
3) Press Map Objects on the Mapping page toolbar, and in the opened window (Objects mapping) you should map the views and , if this was not done automatically.
4) Select a comparison key in the Comparison key column, and map columns in the Column mapping window.
5) Compare.

Was it helpful?
.jp
Devart Team
 
Posts: 303
Joined: Wed 09 Sep 2009 06:55
Location: devart

Postby rand0m » Wed 24 Nov 2010 22:49

Thanks that was helpful. It worked but it is unfortunate that I have to create a view for every condition I'd like to compare.
Maybe this could be a feature in the next release? :)

On another note, is it possible to give the comparison objects are more 'business-friendly' name when displayed in the report?
Something like:
"Comparison between X and Y where Z"
as opposed to:
"." and
".\."

Thanks in advance.
rand0m
 
Posts: 3
Joined: Tue 23 Nov 2010 00:53

Postby .jp » Thu 25 Nov 2010 11:43

rand0m wrote:Thanks that was helpful. It worked but it is unfortunate that I have to create a view for every condition I'd like to compare.
Maybe this could be a feature in the next release? :)

Yes, this is a good suggestion. Now table mapping works in the one-to-one mode. In the next version of the product we will implement one-to-many table mapping, and than you will be able to solve your task without creating additional views. Also we want to implement the Custom Query functionality. I. e., to have possibility to compare results of two queries that return data without creating additional views, because in some cases for the sake of security a user can perform data selection, but cannot create objects (for example, views, as in your case).
rand0m wrote:On another note, is it possible to give the comparison objects are more 'business-friendly' name when displayed in the report?
Something like:
"Comparison between X and Y where Z"
as opposed to:
"." and
".\."

Yes, you are also right. We should make our data reports more usable. We would appreciate if you send us a report template that you would like to use for your tasks, so that we could implement its appearance more precisely.

Can I ask one more question? Should we also include the comparison results for some particular object to a report (i. e. to include the bottom grid) besides all that was listed?
.jp
Devart Team
 
Posts: 303
Joined: Wed 09 Sep 2009 06:55
Location: devart


Return to dbForge for Oracle