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 |
Explain teradata vs. Redshift?
If the query is NOT WRITTEN PROPERLY then what are the recommendations you can give to the developer ?
How to identify ppi columns?
Describe primary index in teradata. And what are the available primary index types?
What is the use of stored procedures in teradata?
Aborted in Phase 1 data Acquistion Incomplete in fastload?
What are normalization, first normal form, second normal form and third normal form?
Difference between star and snowflake schemas?
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.
What interface is used to connect to windows based applications?
How to eliminate product joins in a teradata sql query?
Different phases of multiload?