Hi All,
I have a table with 3 fields like id,mark1,mark2 and I would
like to update a mark3 field that would calculate the max
for each record (so the max value of the 2 fields) in
Teradata
ID Mark1 Mark2 Mark3
1 10 20
2 20 30
3 40 10
4 50 50
I Have to write a update statement Mark3 with max value of
mark1,mark2 fields…like bellow
ID Mark1 Mark2 Mark3
1 10 20 20
2 20 30 30
3 40 10 40
4 50 50 50
Please any one help me ....Thq
Answer Posted / tdguy
Above answer is correct. Update statement would be the best
option (with case).
Update tablename
set mark3 = case when mark1>mark2
then mark1 else mark2 end;
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
How do you set the session mode parameters in bteq?
Can we have two time dimensions in a schema(either star or snow flake)? For ex if we want joining date of employee and if we want today's sales with time whether can we have two time dimensions for accommodating above tasks?
During the Display time, how is the sequence generated by Teradata?
If RDBMS is halted what will you do ?
What does sleep function does in fast load?
If Fast Load Script fails and only the error tables are made available to you, then how will you restart?
How would you load a very large file in teradata in general?
How many types of joins are there in teradata?
What are the various reporting tools in the market?
What are differences between teradata and ansi session modes in teradata?
What is teradata? What are some primary characteristics of teradata?
If the PMON is not working then how do you manage and monitor all processes, resources and sessions etc.
Explain PDE.
Comment whether bottleneck is an error or not.
any one answer me how they can analyzing the project using data ware housing?