Compare table data - column order specific?

andyh

Member²
Hi,

I've two tables that I'd like to compare the data of. When I run the compare routine I get a 'Columns Differ Source[2], target [1]' message.

My source is:

create table BILLING_ITEMS
(
PRUN_ID NUMBER(10) not null,
NAME VARCHAR2(80) not null,
DESCRIPTION VARCHAR2(80) not null,
SORT_ORDER NUMBER,
ITEM_TYPE VARCHAR2(1) not null,
CREATED_BY NUMBER not null,
CREATED_ON DATE not null,
UPDATED_BY NUMBER,
UPDATED_ON DATE
)
My target is:
create table BILLING_ITEMS
(
NAME VARCHAR2(80) not null,
PRUN_ID NUMBER(10) not null,
DESCRIPTION VARCHAR2(80) not null,
SORT_ORDER NUMBER,
ITEM_TYPE VARCHAR2(1) not null,
CREATED_BY NUMBER not null,
CREATED_ON DATE not null,
UPDATED_BY NUMBER,
UPDATED_ON DATE
)

As far as I can see, the only difference is the column order - does this cause a problem for the compare routine?
 
What if you create temporary view that selects data from the second table, but has the same order of columns as the first one?
 
Originally posted by CTzen:
What if you create temporary view that selects data from the second table, but has the same order of columns as the first one?
Compare only works against tables, it won't compare a table against a view.
 
Back
Top