I Have Name field in a Table
Name
-------------
abcde;fgh;ijk;
abc;def;jklm;no
I want to write a sql to display name field data with out
';'.so i want to replace ; with '' how will write in
Teradata
Answers were Sorted based on User's Feedback
Answer / tdguy
In TD 14.0, i hope OREPLACE function can be used.
SEL OREPLACE(Name,';',NULL) can be used to remove the ';'
character from the string.
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / nitin bansal
You can use TRANSLATE function.
select translate(Name,'',';') as Name
from tablename;
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / srav
select case when substr(id,1,3)=';' then ' 'else substr(id,1,3)end from sravya.test4
| Is This Answer Correct ? | 0 Yes | 1 No |
What is the difference between global temporary tables and volatile temporary tables?
i have column like below studentid studentname sub1 sub2 sub3 1 aaa 40 70 90 2 bbb 60 80 50 i want to execute every student highest mark in which subject my o/p like below studentid studentname sub3 sub2 1 aaa 90 2 bbb 80
Steps to create a data model?
What are default access rights in teradata?
How to cast date "2015-03-03-012204-000000" to timestamp
What is the difference between correlated sub queries and inner queries?
How do you eliminate duplicates?
1.what is activity count? 2.what is skew factor? how it's working explain brefily
What are differences between teradata and ansi session modes in teradata?
what are the uses of fact table and dimension table in banking project?
What do you mean by caching in teradata?
if collect stats but it show low confidence why?