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



I Have Name field in a Table Name ------------- abcde;fgh;ijk; abc;def;jklm;no I want to wr..

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

I Have Name field in a Table Name ------------- abcde;fgh;ijk; abc;def;jklm;no I want to wr..

Answer / nitin bansal

You can use TRANSLATE function.

select translate(Name,'',';') as Name
from tablename;

Is This Answer Correct ?    1 Yes 1 No

I Have Name field in a Table Name ------------- abcde;fgh;ijk; abc;def;jklm;no I want to wr..

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

Post New Answer

More Teradata Interview Questions

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

12 Answers   CTS,


Hash collision?

3 Answers   Satyam,


What is the purpose of joins in teradata and what are the available join types?

0 Answers  


Hi send me the Teradata dumps to my id rajeshanantha@yahoo.co.in Thanks Rajesh. A

0 Answers  


How does indexing improve query performance?

4 Answers   Satyam,


What is meant by a Parsing Engine?

0 Answers  


Difference between inner join and outer join?

0 Answers  


what is a multi statement request in TD? what is the diif b/w V2R5 & TD12? what is the diff b/w MACRO & STORED PROCEDURE?

3 Answers   HCL,


What are the functions involved in shared information architecture?

0 Answers  


Give the sizes of SMALLINT, BYTEINT and INTEGER.

0 Answers  


What are the primary characteristics of the Teradata.

0 Answers  


How do you set the session mode parameters in bteq?

0 Answers  


Categories