ODBC Look up

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
g_rkrish
Participant
Posts: 264
Joined: Wed Feb 08, 2006 12:06 am

ODBC Look up

Post by g_rkrish »

Hi,


i am trying to look up a table.when i try running that table what it does is it puts the first row value to all the rows not matter lookup found or not found.

when i do the same thing using hash file it works.It looks weired.i tried running the query it works fine in the database.


Can any one help me out in this?

thanks,
RK
RK
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Did you define the key values used in the WHERE clause on the reference stage?
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

It is related to keys in the WHERE clause,just define the key=? when using a user defined SQL.

Thanks
sam
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I've found you can't rely on the NOTFOUND link variables for anything other than hashed file lookups. Using them with a database stage is asking for trouble. Fall back on the old fashioned 'check a key field for null' techinque to see if the lookup failed.
-craig

"You can never have too many knives" -- Logan Nine Fingers
g_rkrish
Participant
Posts: 264
Joined: Wed Feb 08, 2006 12:06 am

Post by g_rkrish »

kcbland wrote:Did you define the key values used in the WHERE clause on the reference stage? ...


thanks,

It works,

I think the real problem was i gave a user defined query.but ideinfed the key column in the ODBC stage but i didn't specify in the reference so it was causing me that problem.

thank you everybody for the help.

RK
RK
Post Reply