New row in source is not loaded into target table

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

NOTFOUND works fine when performing lookup on Hashed Files but for the Table lookup it is always better to use the null check.

sAM
I haven't failed, I've found 10,000 ways that don't work.
Thomas Alva Edison(1847-1931)
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yes, always better because NOTFOUND doesn't really work for non-hashed file based lookups. :wink:

Hard to tell, though - is your lookup to a hashed file or directly to a database table?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Seyed
Participant
Posts: 74
Joined: Wed Apr 14, 2010 7:25 am
Location: Oklahoma City

Post by Seyed »

us1aslam1us wrote:NOTFOUND works fine when performing lookup on Hashed Files but for the Table lookup it is always better to use the null check.

sAM
Hi Sam,
Thank you for your input. You are correct. NOTFOUND would not work with database tables. To resolve this issue, my co-worker and I added an intermediate Hashed File stage and did a 'NOTFOUND' check on that. This worked and the row in question got loaded.

Thank you very much,

Seyed
Last edited by Seyed on Thu Apr 26, 2012 9:00 am, edited 1 time in total.
Seyed
Participant
Posts: 74
Joined: Wed Apr 14, 2010 7:25 am
Location: Oklahoma City

Post by Seyed »

chulett wrote:Yes, always better because NOTFOUND doesn't really work for non-hashed file based lookups. :wink:

Hard to tell, though - is your lookup to a hashed file or directly to a database table?
Craig,
Thank you as always. To answer your quesiton, I was originally using NOTFOUND on ODBC stage. After adding an extra step by feeding the data from and ODBC stage to a Hashed File stage, the NOTFOUND worked and the row in question got loaded.

Thank you and continued success,

Seyed
Post Reply