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
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 |
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 |
Answer / tdguy
Above answers are correct, but data type should be taken
care of.
| Is This Answer Correct ? | 1 Yes | 0 No |
What are normalization, first normal form, second normal form and third normal form?
How to copy teradata scripts from ur remote desktop to server machine?
What does Amp contain and what are all the operations that it performs?
What is the use of upsert command in teradata?
What is the function of parser component in teradata?
What is meant by a node?
How many macros we can create inside a macro
Explain the most common data types used in teradata?
What's the syntax of sub string?
What EXPLAIN does in Teradata, what is High confidence, Low confidence and No confidence.. And How we improve the query performance .
Can we load a Multi set table using MLOAD?
Can we have an unconnected lkp to lookup a db2 record against a teradata record? Doesnt seem to work. I could be wrong