Archives of the TeradataForum
Message Posted: Fri, 30 Jul 2010 @ 14:51:00 GMT
Subj: | | Re: Deleting unwanted/duplicate records |
|
From: | | Fred W Pluebell |
Glad that helped. One last comment regarding the fixed substring approach. If the "RT" code is always located in the 18th and 19th character
position from the left, then either
SUBSTR(I_IRD,18,2) = 'RT'
or the equivalent ANSI syntax
SUBSTRING(I_IRD FROM 18 FOR 2) = 'RT'
should have worked.
Sometimes a string can have leading spaces or other anomalies that make it harder to find the proper expression. You could take one of your
queries with SUBSTR that didn't work, and include the substring expression in the SELECT list to see what value it's actually comparing against.
The CHAR2HEXINT function can also be useful in determining how the string is represented internally.
|