Page 1 of 1

Data comparison with Mix Case alphabets

Posted: Fri Jul 15, 2005 8:50 am
by saadmirza
Hi,
I have data coming from the source with words having Mix case(e.g MiKe)...I need to compare the word with a hash file lookup that contains a word(e.g MIKE)...with a normal match i am not able to do that...how do i achieve the same using DS.?

Regards,
SM

Posted: Fri Jul 15, 2005 9:18 am
by ArndW
The UPCASE() function will convert to uppercase pretty efficiently, do that with both strings and you are in production 8)

Posted: Fri Jul 15, 2005 9:37 am
by saadmirza
Yes Arnd,
Thats pretty simple...but the actual requirement is to restore the data with the original mix case characters...

Thanks,
SM

Posted: Fri Jul 15, 2005 10:01 am
by ArndW
Could you explain? Your post states you want to do a match with one uppercase string to a mixed case string, the UPCASE() function lets you do that. So you now have the original string , an uppercased string and a true/false result on a match - what more do you need?

Posted: Fri Jul 15, 2005 11:07 am
by talk2shaanc
In short,
for comparison have UPCASE(Src.Name)=UPCASE(Lkp.NAME), but while writing the field, dont do any transformation, simple one to one mapping(do not change case)

Posted: Fri Jul 15, 2005 11:11 am
by ds_developer
You can use the UpCase function in the Key Expression of the hash lookup for the comparison, but not UpCase the field as it goes to your target.

Hope this helps.

John

Posted: Sat Jul 16, 2005 4:16 pm
by Sainath.Srinivasan
You can pass your source link value to the target to retain mixed case.

Posted: Wed Jul 20, 2005 8:00 am
by saadmirza
Yes I can do an Upcase in the Hashfile Key Expression column...but what about my source file...for e.g in hash file I have "John" and the source file I have "JOHn" as input...how do I compare using hash file compare?

Please suggest.

Thanks,
SM

Posted: Wed Jul 20, 2005 8:03 am
by ArndW
Make the acutal key to your Hash file an uppercase name, create a temporary column in your job with the uppercase lookup name and use that as the lookup key to your hash file.

Posted: Wed Jul 20, 2005 10:01 am
by Sainath.Srinivasan
Or simply use UpCase function in the link to reference.