Starange Problem

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
nsm
Premium Member
Premium Member
Posts: 139
Joined: Mon Feb 09, 2004 8:58 am

Starange Problem

Post by nsm »

I have one field coming in from the source with values
YES or NO

and I have in my Oracle table
1 YES
2 NO
3 UNKNOWN

what i have to do is compare the src value and i have to get the key(1 or 2 or 3)

both are varchar fields I am trimming to make sure there is no space too..but its never matching those values i checked the hash values and the src values looks everything same.

Did anybody ever got through these type of situation? if, suggest me..

nsm.
ogmios
Participant
Posts: 659
Joined: Tue Mar 11, 2003 3:40 pm

Re: Starange Problem

Post by ogmios »

Post the code that does the comparison please.

Ogmios
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Does the job that pre-loads the hashed file that you use for reference lookups Trim the values on the way in, and declare the description field to be the key and the code field to be the non-key column?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
nsm
Premium Member
Premium Member
Posts: 139
Joined: Mon Feb 09, 2004 8:58 am

Post by nsm »

Code to populate Hash File:
SELECT web_key,upper(rtrim(web_text)) FROM WEB_DIM

From the source:
upcase(trim(DSLink3.web_src_text))

This is the code i am using to compare the incoming and hash value.
suggest me,if you get any ideas.

nsm.
ogmios
Participant
Posts: 659
Joined: Tue Mar 11, 2003 3:40 pm

Post by ogmios »

nsm wrote:Code to populate Hash File:
SELECT web_key,upper(rtrim(web_text)) FROM WEB_DIM

From the source:
upcase(trim(DSLink3.web_src_text))

This is the code i am using to compare the incoming and hash value.
suggest me,if you get any ideas.

nsm.
Both rtrim or both trim?

Ogmios
nsm
Premium Member
Premium Member
Posts: 139
Joined: Mon Feb 09, 2004 8:58 am

Post by nsm »

trim on both.


nsm.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I think the code you need to populate the hashed file should be

Code: Select all

SELECT upper(rtrim(web_text)),web_key FROM WEB_DIM
and that the hashed file's key column should be web_text.
Is this the case?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
pedro.duran.silva
Participant
Posts: 9
Joined: Mon Apr 28, 2003 4:42 am

Post by pedro.duran.silva »

nsm,

Put the key first.

It's look strange but, create the hash file with que web_text on the 1st place, as a key.

My problem was with tables, but the solution was this. key columns first.

i hope it's works.

cya
Pedro Duran
nsm
Premium Member
Premium Member
Posts: 139
Joined: Mon Feb 09, 2004 8:58 am

Post by nsm »

I tried as you said still its not working..

nsm.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I think it's time for you to post the exact:
  • (a) column definitions from the main input link
    (b) column definitions from the reference input link
    (c) reference key expression
    (d) any constraint expression
    (e) samples of data from main input link with text fields quoted
    (f) samples of data from reference input link with text fields quoted
Just a few rows will do for (e) and (f).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply