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

Explain vproc in teradata?

0 Answers  


Can we collect statistics on table level?

0 Answers  


i have a table like sales....the field are Prodid Jan(jam month sales)Feb March 1 20 76 50 2 30 94 40 3 40 90 30 4 70 20 30 5 23 40 40 6 85 30 55 7 84 20 65 8 10 93 40 9 57 30 30 10 38 83 40 11 35 39 90 12 83 89 50 Now the Question is i want get the max sales of 12 products from the months.hint:for eg I WANT GET 89 for product12... Can any one help me

8 Answers   Satyam,


Hi frnds...can any one help me regarding this que.. We have column in a table name it as C1 WHICH CONTAIN ALPHANUMERIC AND NUMERIC VALUES. C1 2A 2B 2V 2H 1 2 3 4 5 i want to retrive numeric values like 1,2,3,4,5 How we can get Plz let me know.Thanks in advance

4 Answers   IBM,


Highlight a few of the important components of Teradata?

0 Answers  






Can you connect multiload from ab initio?

0 Answers  


Can we have an unconnected lkp to lookup a db2 record against a teradata record? Doesnt seem to work. I could be wrong

0 Answers  


What is a level of granularity of a fact table?

0 Answers  


can i call router is a passive transformation

2 Answers  


When tpump is used instead of multiload?

0 Answers  


Explain the term 'database' related to relational database management system?

0 Answers  


What is oltp?

0 Answers  


Categories