Title Case

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
imfarhan
Participant
Posts: 53
Joined: Tue Jul 24, 2012 9:34 am

Title Case

Post by imfarhan »

Hi
I'm getting values in my data like 'New york' because of that it doesn't match with my lookup(LU) as it keeps 'New York' (First letter of each word should be capital but in my data some time its keep small letter)
I was thinking to use something like title(New york) which should change to 'New York'.
IS there any function I can use as I can only see "Upper" under string function under transformer control.

I've searched the following on this forum, some one advised use CAPITAL but not found.
second advised to use function made in C++ I can not see that function too and don't know how to write using C++ and how to call in my transformer stage.

Do you think I can use two function like UPPER and Space to get this work,
hope make sense

Many thnaks
Farhan
Farhan Syed
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The advise to use CAPITAL also specifically said to use it in a BASIC transformer as it is a Server transform. If you're not fluent in C++ don't even start down that path as it is dangerous and full of pitfalls. If you are trying to match two strings regardless of case, best advice has always been to "upper" (or lower would work too) each side before doing the comparison.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ShaneMuir
Premium Member
Premium Member
Posts: 508
Joined: Tue Jun 15, 2004 5:00 am
Location: London

Post by ShaneMuir »

Couldn't you just set your lookup to be caseless? (A=a in the lookup key type)
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Pffffttt... even better!

"If you want the comparison performed on this column to ignore case, then select the Caseless check box."
-craig

"You can never have too many knives" -- Logan Nine Fingers
rameshrr3
Premium Member
Premium Member
Posts: 609
Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN

Post by rameshrr3 »

Uppercase & Trim data on both links just for the Lookup to happen ( requires use of transfromer stages or db functions) .
Post Reply