ravikiran


{ City } nellore
< Country > india
* Profession * employer
User No # 95944
Total Questions Posted # 0
Total Answers Posted # 14

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 31
Users Marked my Answers as Wrong # 4
Questions / { ravikiran }
Questions Answers Category Views Company eMail




Answers / { ravikiran }

Question { IBM, 6070 }

We are migrating an oracle table into teradata, the volume
of data is huge and partitioned (year wise list partition).

How do i simulate the same in teradata.


Answer

>>> do the partition in teradata as per ur bussiness req.use
Tpt export to export the data from oracle to flatfile.use
multiload to load the flatfile data to table.do year wise
exports and imports if data is huge.

Is This Answer Correct ?    0 Yes 0 No

Question { HCL, 8514 }

whether Nulls will be counted while doing average?
example: we have table column A with following values
A
--
5
Null
8
3

Now what is the average of A?


Answer

while doing average nulls value cannot considered
>>in that above example 4 values is there but while
caluculating average it consider only 3 values y becz in
that four values one values is there so the o/p is
>> 5+null+8+3=16/3

Is This Answer Correct ?    2 Yes 0 No


Question { HP, 4886 }

can we load 10 millions of records into target table by using
tpump?


Answer

yes we can load 10 millions of records into target table by
using tpump but it takes more time.y because it applies
rowhash lock on each row.,
>>generally less volume of data we go for tpump.,
>>if the table doen't have any limitations of fastload d
multiload then go for fastload.,

Is This Answer Correct ?    4 Yes 0 No

Question { 4642 }

teradata support to automatically increase the character
length or not?


Answer

teradata supports datalength change to only varchar
datatypes......

Is This Answer Correct ?    0 Yes 3 No

Question { IBM, 8648 }

can we join volatile table with general table an global
temporary table with general table
?


Answer

yes we can join volatile to general table;
>> first we create volatile table
syntax:
create volatile table vt1(x int,y int)on commit preserve rows;
>> we can create general table
syntax:
create table t1(x int,y int,z int);
>>now we can join volatile table and general table
Eg:
select a.x,b.x from vt1 a,t1 b where a.x=b.x;

Is This Answer Correct ?    0 Yes 0 No

Question { IBM, 7789 }

Hi Frnds this que is recently asked at IBM
there are two rows like aa6588fhfhf,gru282vbvv.
Question is howcan we retrive the first number from two
rows.
Can any one help

thanks in advance


Answer

Hi,gautam nice 2 see ur answer can u show me that output in
one sql.,
thanks in advance

Is This Answer Correct ?    1 Yes 0 No

Question { IBM, 5465 }

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


Answer

when we collect stats the demographic information stored on
table header.so the optimizer picks the stats information
from the table header for generating plan for a given query.

Is This Answer Correct ?    1 Yes 0 No

Question { TCS, 6767 }

TCS recently asked this question

I have records like below

Emp id Empname Salary DateTimestamp
1 AA 6000 20120609:11:30
1 AA 7000 20120609:12:30
1 AA 8000 20120609:01:30
I want to exceute records max timestamp(20120609:01:30)


Answer

HI,
U WANT TO DISPLAY MAX TIMESTAMP
SO THE QUERY IS
SELECT * FROM TABLENAME WHERE DATETIMESTAMP IN(SELECT
MAX(DATETIMESTAMP) FROM TABLENAME);

Is This Answer Correct ?    18 Yes 0 No

Question { Satyam, 9074 }

i have a table like sales....the field are

Prodid Jan(jam month sales)Feb March

1 20 76 50
2 30 94 40
3 40 90 30
4 70 20 30
5 23 40 40
6 85 30 55
7 84 20 65
8 10 93 40
9 57 30 30
10 38 83 40
11 35 39 90
12 83 89 50
Now the Question is i want get the max sales of 12 products
from the months.hint:for eg I WANT GET 89 for product12...

Can any one help me


Answer

HI,

>>THE QUERY IS

>>SELECT CASE WHEN JAN>FEB AND JAN>MAR THEN JAN ELSE (CASE
WHEN FEB>JAN AND FEB>M
R THEN FEB ELSE MAR END) END FROM SALES;

Is This Answer Correct ?    0 Yes 0 No

Question { Satyam, 9074 }

i have a table like sales....the field are

Prodid Jan(jam month sales)Feb March

1 20 76 50
2 30 94 40
3 40 90 30
4 70 20 30
5 23 40 40
6 85 30 55
7 84 20 65
8 10 93 40
9 57 30 30
10 38 83 40
11 35 39 90
12 83 89 50
Now the Question is i want get the max sales of 12 products
from the months.hint:for eg I WANT GET 89 for product12...

Can any one help me


Answer

i hope in that above query satisfy ur requirement.for that
question can anyone find new query post me
ravikiran.mca.vadali@gmail.com

Is This Answer Correct ?    0 Yes 0 No

Question { Satyam, 9074 }

i have a table like sales....the field are

Prodid Jan(jam month sales)Feb March

1 20 76 50
2 30 94 40
3 40 90 30
4 70 20 30
5 23 40 40
6 85 30 55
7 84 20 65
8 10 93 40
9 57 30 30
10 38 83 40
11 35 39 90
12 83 89 50
Now the Question is i want get the max sales of 12 products
from the months.hint:for eg I WANT GET 89 for product12...

Can any one help me


Answer

select case when jan>feb and jan>mar and jan> apr and jan>
may and jan>jun then
jan else (case when feb>jan and feb>mar and feb>apr and
feb>may and feb>jun then
feb else (case when mar>jan and mar>feb and mar>apr and
mar>may and mar>jun then
mar else (case when apr>jan and apr>feb and apr>mar and
apr>may and apr>jun then
apr else (case when may>jan and may>feb and may>apr and
may>mar and may>jun then
may else (case when jun>jan and jun>feb and jun>mar and
jun>apr and jun>may then
jun end)end)end)end)end)end from sales;
upto dec we can use similar query to get the max sales from
that sales table i hope u undertand if u have any queries
reach me ravikiran.mca.vadali@gmail.com

Is This Answer Correct ?    0 Yes 0 No

Question { Satyam, 9243 }


i have a table like sales....the field are

Prodid Jan(jam month sales)Feb March apr may jun july

1 20 76 50 74 94 93 83
2 30 94 40 94 93 93 02
3 40 90 30 49 94 92 56
4 70 20 30 93 46 35 78
5 23 40 40 39 84 46 57
6 85 30 55 93 46 46 46
7 84 20 65 83 56 57 57
8 10 93 40 93 68 57 36
9 57 30 30 83 67 57 79
10 38 83 40 83 55 68 47
11 35 39 90 94 57 78 47
12 83 89 50 93 79 69 69
i wat ti find the max sales of every product which i want to
load into target table


Answer

select case when jan>feb and jan>mar and jan> apr and jan>
may and jan>jun then
jan else (case when feb>jan and feb>mar and feb>apr and
feb>may and feb>jun then
feb else (case when mar>jan and mar>feb and mar>apr and
mar>may and mar>jun then
mar else (case when apr>jan and apr>feb and apr>mar and
apr>may and apr>jun then
apr else (case when may>jan and may>feb and may>apr and
may>mar and may>jun then
may else (case when jun>jan and jun>feb and jun>mar and
jun>apr and jun>may then
jun end)end)end)end)end)end from sales;
i hope this ans fulfill ur req.,

Is This Answer Correct ?    0 Yes 0 No

Question { 5280 }

If the table does not have duplicates then which utility you
can suggest to load the data ?


Answer

Hi,

>>If the table doesn't have any
duplicates(triggers,sp,ji,hi,nusi,usi) we go for fastload.

>>if the table data <1mill we go for bteq

Is This Answer Correct ?    5 Yes 1 No

Question { CTS, 9166 }

sel a.t1,b.t1 from emp a left outer join dept b ON
a.id=b.id where b.deptno=10;
sel a.t1,b.t1 from emp a left outer join dept b ON
a.id=b.id and b.deptno=10;
what is the difference on the above 2 queries?


Answer

Hi..,guys.,
joins concepts we are not use where conditions on queries
>>so in that above query we are using where instead of and.
so that is the difference b/w this two queries......,,,,,,,,
>>if any ones knows better result send me..,,

Is This Answer Correct ?    0 Yes 0 No