Page 1 of 1

Find the new value or existing value?

Posted: Fri Apr 19, 2013 5:00 am
by pkll
Hi All,

I have custno,custname,loc columns are there in Customer table.In this i need to check custno is new value or not? if the custno is new value then insert the custno into another table,if the tcustno is already existed value then ignore the custno....


Can you please let me know how to find new or existed?

Posted: Fri Apr 19, 2013 5:06 am
by ray.wurlod
Do you mean new in the stream of data or new in the database to which you're writing? (Tip: learn to write clear specifications - it will help any career to which you might aspire in IT.)

In the first case sort the stream and generate a key change column.

In the latter case, perform a lookup and set a flag. OR with that flag in subsequent lookups.