How to handle nulls in Teradata???
How many columns can be there in a table???
How to find average sal with out using avg function????

Answers were Sorted based on User's Feedback



How to handle nulls in Teradata??? How many columns can be there in a table??? How to find average..

Answer / sri

without using "avg" we can find the avg salary by using sum
(sal)/count(sal);

sel sum(sal)/count(sal) as avgsal from tablename

regards,
sri

Is This Answer Correct ?    9 Yes 0 No

How to handle nulls in Teradata??? How many columns can be there in a table??? How to find average..

Answer / yuvaevergreen

1. Use zeroifnull,nullifzero in select and NULL in insert
directly.
2. 256 columns max per table.

Is This Answer Correct ?    9 Yes 1 No

How to handle nulls in Teradata??? How many columns can be there in a table??? How to find average..

Answer / tdguy

1. use coalesce(column1,column2) or case when column1 is
nul...end or zeroifnull(column1) to handle nulls.
2. in TD 14.0 there can be 2048 columns per table.
3. sum/count gives you the average of the field.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Teradata Interview Questions

Hi Friends I have a sql question, We have the source data as below. 101 address1, address2, address3 and the output shoulb like below 101 address1 101 address2 101 address3 Required a SQL query for this output. Please let me know if you have any sql query for this. Thanks in advance. Hari M

6 Answers   JPMorgan Chase,


IN A TABLE CAN WE USE PRIMARY KEY IN ONE COLUMN AND IN ANOTHER COLUMN BOTH UNIQUE AND NOT NULL CONSTRAINS.IF YES HOW?PLZ GIVE ME A EXAMPLE.

2 Answers  


Why Fload doesn’t support multiset table?

9 Answers  


What are the design features involved in teradata?

0 Answers  


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

0 Answers  


If table have access lock.In the same table write lock is posible or not?

1 Answers  


how can we analyze the locks ?

0 Answers   HP,


Explain the new features of teradata?

0 Answers  


What are types of partition primary index (ppi) in teradata?

0 Answers  


How do you create tables? Exact syntax, and create profiles, users in teradata?

0 Answers  


How many types of index are present in teradata?

1 Answers  


What is spool space?

0 Answers  


Categories