Page 1 of 1

Check for Empty Table

Posted: Fri Jul 17, 2009 3:52 am
by Vishal1982
Hi All,

I have a source table and target table ,i want to transfer some records into target based on records exist in target table i.e. if target table is empty then i want to transfer all the records from source and if target table is not empty , i want to transfer the records from source which are not in target and updated records from source .

Thanks in Advance

Re: Check for Empty Table

Posted: Fri Jul 17, 2009 4:01 am
by RShiva
Simply use update action -- update existing records and insert new records option i.e upsert load mode in target table.
Specify what stage you are using to load target table?

Posted: Fri Jul 17, 2009 6:31 am
by chulett
Build a hashed file reference lookup from your target and use that to drive your actions. That way you can insert new records and update any changed records and pitch everything else with the right constraints.