Archives of the TeradataForum
Message Posted: Wed, 01 Sep 2004 @ 20:49:53 GMT
Subj: | | Re: FAST EXPORT Replace function |
|
From: | | Sridhar Nomula |
We have come up with a temporary solution to remove PIPE from the data. By using POSITION function and doing SUBSTRING on the data. But, this
will solve our problem of removing first occurence of PIPE any subsequent PIPE characters will not be detected. Luckily there is only one PIPE
exists in the column. Our permanent solution will be to cleanse data before it arrives to Teradata Box. We do not have option of creating new
UDF's since our team is not in control of Teradata Box. It is big overload of Change Request for doing that.
Here is the code that I am trying to implement.
TRIM(BOTH FROM (
CASE
WHEN POSITION('|' IN col_a) = 0 THEN col_a
ELSE SUBSTR(col_a,1,POSITION('|' IN col_a) -
1) || ' ' || SUBSTR(col_a,POSITION('|' IN col_a) + 1)
END))
) COL_A,
Thanks again for suggestions on FASTEXPORT vs BTEQ. I too realised that FASTEXPORT is very fast when it comes to speed issues. We have
also compared with other tools like SAS which acts like gateway between Teradata and Oracle but, not suitable for high volume of data that I am
working on.
Regards
Sree
|