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

What is called partitioned primary index (ppi) and discuss the advantages of using it in a query?

0 Answers  


What do you mean by teradata intellicloud?

0 Answers  


What is Join Index in TD and How it works?

6 Answers   BT, CSC, TCS,


how to improve the query perfoemance in teradata.with example?and how explain this in interview?please forward answer

2 Answers   IBM,


What are the components used in smp and massively parallel processing (mpp) machines?

0 Answers  






How do you do backup and recovery in teradata?

0 Answers  


why varchar takes 2 extra bytes?

4 Answers   IBM,


TCS recently asked this question I have records like below Emp id Empname Salary DateTimestamp 1 AA 6000 20120609:11:30 1 AA 7000 20120609:12:30 1 AA 8000 20120609:01:30 I want to exceute records max timestamp(20120609:01:30)

2 Answers   TCS,


What is meant by Teradata Gateway?

0 Answers  


What are the various reporting tools in the market?

0 Answers  


What is collect statistics?

0 Answers  


Can any one explain me the difference between BTEQ and MLOAD,TUMP. All canbe used for same purpose but still differnt methods. why ?

0 Answers  


Categories