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 some primary characteristics of teradata?

0 Answers  


I have all the TERADATA Certification Dumps for the below: NR0-011, NR0-012, NR0-013, NR0-014 NR0-015 NR0-016, NR0-017 If anyone need it, pls drop me a mail with Code in the mail to: terashish@gmail.com

201 Answers   Cognizant, Deloitte, IBM, Prometric, Syntel,


What are the 5 phases in a multiload utility?

0 Answers  


During the Display time, how is the sequence generated by Teradata?

0 Answers  


Different phases of multiload?

0 Answers  






What is called partitioned primary index (ppi)?

0 Answers  


what is the difference between filter and router transmissions

2 Answers  


What is a clique?

0 Answers  


How is MLOAD Teradata Server restarted after execution?

0 Answers  


What are default access rights in teradata?

0 Answers  


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

0 Answers  


Highlight the need for Performance Tuning.

0 Answers  


Categories