write a query following data.
123.45 is input.write a query after decimal (ex:.45) load
into database ?how it possible?

Answers were Sorted based on User's Feedback



write a query following data. 123.45 is input.write a query after decimal (ex:.45) load into datab..

Answer / yuvaevergreen

Assuming the column type to be decimal type and the same table to be updated, the string function can be used.
update dbname.tbname
set salary=
substr(cast (salary as char(10)),index(cast (salary as char(10)),'.'))
>>>salary is of type decimal..

Is This Answer Correct ?    7 Yes 1 No

write a query following data. 123.45 is input.write a query after decimal (ex:.45) load into datab..

Answer / ankal

assuming this value is sal colume i mean sal=123.45; u want to update it with after decimal value.i think The following query try.

update table_name set sal=sal-cast(sal as int));

Is This Answer Correct ?    4 Yes 1 No

write a query following data. 123.45 is input.write a query after decimal (ex:.45) load into datab..

Answer / tdguy

Above answers are correct, but data type should be taken
care of.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Teradata Interview Questions

What are teradata utilities?

0 Answers  


What is the use of virtual processor connectivity in teradata?

0 Answers  


Hash collision?

3 Answers   Satyam,


How to identify ppi columns?

0 Answers  


What is the difference between teradata and oracle?

0 Answers  






What are some commonly used bteq scripts?

0 Answers  


How teradata makes sure that there are no duplicate rows being inserted when its a set table?

0 Answers  


What is meant by MATCHTAG in multiload utility?

2 Answers   Satyam,


what is object level locking ? where do appear this type of locking ?

0 Answers  


What are the 5 phases in a multiload utility?

0 Answers  


Can some one tell me the ressolution for the error. I was not able to answer this question in wipro interview. "The transaction exceeded the maximum number of rowhash locks allowed"

1 Answers   Wipro,


what is use of fload loading into set table?

2 Answers   IBM,


Categories