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 is meant by a Highest Cost Plan?

0 Answers  


Comment whether bottleneck is an error or not.

0 Answers  


What do you mean by caching in teradata?

0 Answers  


Hi, If anyone has TD 14 Basics dumps or study materials, please share. nirmaaal1991@gmail.com

0 Answers  


Describe the set operators in teradata.

0 Answers  






What are the different softwares used with their functions in teradata?

0 Answers  


i learn teradata,it is so intersting,now i want teradata certifications ,so any 1 help me to get teradata certifications TD 12 ? email:kdcrazyy@gmail.com

0 Answers  


Hi frnds this question is asked at IBM One query is there when we dont collect stastics on it,exlapin will show us LOW CONFIDENCE,When we collect stastics it shows HIGH CONFIDENCE.WHAT IS THE INTERNAL ARCHITECTURE ACTUALLY GOING ON ?????ASKED ON 23-08-2012 THANKS IN ADVANCE

2 Answers   IBM,


Difference between Teradata V2R5 and Teradata V12 versions?

2 Answers   IBM,


teradata support to automatically increase the character length or not?

1 Answers  


why use references rather than pointers in the public api, particularly for arguments which are modified?

0 Answers  


Describe the between keyword in teradata?

0 Answers  


Categories