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

Why MLOAD needs Work Tables?

5 Answers   Teradata,


Explain teradata utilities?

0 Answers  


How is MLOAD Teradata Server restarted after execution?

0 Answers  


How a Referential integrity is handled in Teradata?

5 Answers  


What is inner join and outer join?

0 Answers  


What are the different functions performed in development phase?

0 Answers  


Does SDLC changes when you use Teradata instead of Oracle?

2 Answers  


What are the uses of bynets in multi-node systems?

0 Answers  


I have a table with emp id, emp name, dept id and sal where dept id is NUSI. SEL * FROM EMP WHERE DEPTID = 100. Can any one explain how it will fetch the record.

4 Answers  


can we have an unconnected lkp to lookup a DB2 record against a Teradata record?

3 Answers  


What is smp and mpp platforms?

0 Answers  


Can you connect multiload from ab initio?

0 Answers  


Categories