 |
 |
Archives of the TeradataForum
Message Posted: Wed, 14 Apr 2004 @ 08:24:16 GMT
Subj: | | Teradata SQL function for SQL server 'REPLACE' |
|
From: | | Agarwal, Rishi |
Hi,
I need to rewrite the below SQL server query in Teradata.
SELECT ProgramID,
REPLACE(ProgramName, '|', '!'),
pt.ProgramTypeID,
pt.ProgramTypeName
FROM AI_DW.DIM_PROGRAM p
JOIN AI_DW.PROGRAM_TYPE pt
on pt.ProgramTypeID = p.ProgramTypeID
There is no REPLACE function in teradata. We can use CASE statement to achieve this. But what if there are more than one occurrence of
'|' found in the string. Is there any other substitute of REPLACE function in teradata.
Thanks & Regards,
Rishi
| |