All Forums Database
Vga 12 posts Joined 02/12
24 Sep 2012
Code Conversion

Experts,
I tried to convert a netezza code to Teradata. Just wanted to confirm, if I have done it correclty.
NZ: LTRIM(TRANSLATE(PHONE_NBR,'  (',''),'1 ')
TD: TRIM (LEADING '1' FROM LCI_UD_FUNCTION.OTRANSLATE(PS_PRO.PRIM_PHONE_NBR,'  (',' '))
As per my research in NZ, Translate & LTRIM functions replaces characters not a whole string. So, not sure if the TD code will work as expected.
Help appretiated!

WAQ 158 posts Joined 02/10
25 Sep 2012

In Teradata TRIM LEADING '1' will also replace leading 1 from your string and rest of the string will remain same.

Qaisar Kiani 337 posts Joined 11/05
25 Sep 2012

Why don't you test it on some sample data!

You must sign in to leave a comment.