Page 1 of 1

Starange Problem

Posted: Fri Feb 27, 2004 1:56 pm
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.

Re: Starange Problem

Posted: Fri Feb 27, 2004 1:58 pm
by ogmios
Post the code that does the comparison please.

Ogmios

Posted: Sat Feb 28, 2004 6:55 am
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?

Posted: Mon Mar 01, 2004 12:45 pm
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.

Posted: Mon Mar 01, 2004 12:56 pm
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

Posted: Mon Mar 01, 2004 1:18 pm
by nsm
trim on both.


nsm.

Posted: Mon Mar 01, 2004 3:12 pm
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?

Posted: Mon Mar 01, 2004 3:20 pm
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

Posted: Tue Mar 02, 2004 9:06 am
by nsm
I tried as you said still its not working..

nsm.

Posted: Tue Mar 02, 2004 3:12 pm
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).