5 Replies Latest reply: Apr 18, 2012 3:41 AM by Mandy Schulte RSS

Error in script

Mandy Schulte

I need some help. I made this script (copied a bit from an example on this community).

 

ODBC CONNECT TO [algemeen;DBQ=ALGEMEEN] (XUserId is HXeGdXNMUTeA, XPassword is AKeZORRGYZMEXZNB);

 

Table:
Load *;
SQL SELECT 'gabel' omgeving, a.owner owner , a.table_name tabel_naam, b.num_rows num_rows, b.last_analyzed last_analyzed
FROM all_tables@gabel a
,    dba_tab_statistics@gabel b
where a.owner not in ('SYSTEM', 'SYS')
and    a.table_name = b.table_name ;
CONCATENATE
Load *;
SQL SELECT 'gpbel' omgeving, a.owner owner , a.table_name tabel_naam, b.num_rows num_rows, b.last_analyzed last_analyzed
FROM all_tables@gpbel a
,    dba_tab_statistics@gpbel b
where a.owner not in ('SYSTEM', 'SYS')
and    a.table_name = b.table_name ;

INNER JOIN (Table)
LOAD *
WHERE "Only in One Table?"
  OR  "Amount Different?"
;
LOAD
  tabel_naam
,if(count(a.table_name)<2,-1) as "Only in One Table?"
,if(max(num_rows)<>min(num_rows),-1) as "Amount Different?"
RESIDENT Table
GROUP BY tabel_naam
;

 

I want to compare both tables. After reload of data I got error message:

Veld niet gevonden - <tabel_naam>  (Veld niet gevonden = Field not found)

LOAD

  tabel_naam

,if(count(a.table_name)<2,-1) as "Only in One Table?"

,if(max(num_rows)<>min(num_rows),-1) as "Amount Different?"

RESIDENT Table

GROUP BY tabel_naam

 

Can anyone help me to solve my problem? Thanks in advance.