Benefits under Public Provident Fund (PPF)
You will find Talend Errors and solutions, Optimization, Tips & Tricks, Performance, Components Explanations ... and much more.
Thursday, 30 July 2015
PPF vs VPF vs EPF
Benefits under Public Provident Fund (PPF)
Wednesday, 29 July 2015
Monday, 20 July 2015
COPYING THE TEXT CONTENT OF PPT TO M.S.WORD.
Open the Power Point u want to copy the text. Do the following :
FILE------> SEND TO ---->MSWORD--->OUTLINE ONLY
ASTROLOGY SITES
This is Traditional Hindu Astrology site
http://www.leoastro.com/
some more astrology sites :
http://www.chineseastrology.com/
http://www.astro-vision.com/
http://www.astrology.com/
http://www.astrology-online.com/
http://www.starlightastrology.com/
http://www.cyberastro.com/
LEARNING....LISTENING....ENGLISH
if you want to be perfect in listening in IELTS please refer this site
http://www.esl-lab.com/
ENAADU PRATIBHA ENGLISH MATERIAL
Here is one more valuable link to learn english.
http://www.eenadu.net/e-pratibha.asp
Some More
http://www.englishdaily626.com/slang.php
http://www.oed.com/
http://www.englishclub.com/
http://www.englishskills.com/Sample_eng.htm
http://www.esl-lab.com/
ENAADU PRATIBHA ENGLISH MATERIAL
Here is one more valuable link to learn english.
http://www.eenadu.net/e-pratibha.asp
Some More
http://www.englishdaily626.com/slang.php
http://www.oed.com/
http://www.englishclub.com/
http://www.englishskills.com/Sample_eng.htm
COMPUTER MAGZINES..HARDWARE
WINDOWS XP MAGZINES The Official Magazine
http://www.windowsxpmagazine.co.uk/
http://technet.microsoft.com/en-us/default.aspx
PC Wolrd -
http://www.pcworld.com/
PC Magazine -
http://www.pcmag.com/
Tom's hardware -
http://www.tomshardware.com/
Slashdot -
http://www.slashdot.org/
Anand tech -
http:// http://www.anandtech.com/
http://www.windowsitpro.com/
http://www.windowsxpmagazine.co.uk/
http://technet.microsoft.com/en-us/default.aspx
PC Wolrd -
http://www.pcworld.com/
PC Magazine -
http://www.pcmag.com/
Tom's hardware -
http://www.tomshardware.com/
Slashdot -
http://www.slashdot.org/
Anand tech -
http:// http://www.anandtech.com/
http://www.windowsitpro.com/
Heart Touching Stories
A wonderful story
A woman came out of her house and saw 3 old men with long white beards sitting in her front yard. She did not recognize them. She said "I don't think I know you, but you must be hungry. Please come in and have something to eat."
"Is the man of the house home?", they asked.
"No", she replied. "He's out."
"Then we cannot come in", they replied.
In the evening when her husband came home, she told him what had happened.
"Go tell them I am home and invite them in!"
The woman went out and invited the men in"
" We do not go into a House together," they replied.
"Why is that?" she asked.
One of the old men explained: "His name is Wealth," he said pointing to one of his friends, and said pointing to another one, "He is Success, and I am Love." Then he added, "Now go in and discuss with your husband which one of us you want in your home."
The woman went in and told her husband what was said. Her husband was overjoyed. "How n ice!!", he said. "Since that is the case, let us invite Wealth. Let him come and fill our home with wealth!"
His wife disagreed. "My dear, why don't we invite Success?"
Their daughter was listening from the other corner of the house. She jumped in with her own suggestion: "Would it not be better to invite Love? Our home will then be filled with love!"
"Let us heed our daughter's advice," said the husband to his wife.
"Go out and invite Love to be our guest ."
The woman went out and asked the 3 old men, "Which one of you is Love? Please come in and be our guest."
Love got up and started walking toward the house. The other 2 also got up and followed him. Surprised, t he lady asked Wealth and Success: "I only invited Love, Why are you coming in?"
The old men replied together: "If you had invited Wealth or Success, the other two of us would've stayed out, but since you invited Love, wherever He goes, we go with him. Wherever there is Love, there is also Wealth and Success !!!!!!"
************************************************************************************
A Touching Story
My wife called, 'How long will you be with that newspaper? Will you come here and make your darling daughter eat her food?'
I tossed the paper away and rushed to the scene. My only daughter Sindu
looked frightened.
Tears were welling up in her eyes. In front of her was a bowl filled to its brim with Curd Rice. Sindu is a nice child, quite intelligent for her age.She has just turned eight. She particularly detested Curd Rice.
My mother and my wife are orthodox, and believe firmly in the 'cooling effects' of Curd Rice!
I cleared my throat, and picked up the bowl. 'Sindu, darling,why don't you take a few mouthful of this Curd Rice?Just for Dad's sake, dear.
Sindu softened a bit, and wiped her tears with the back of her hands.
'OK, Dad. I will eat - not just a few mouthfuls, but the whole lot of this.
But, you should...' Sindu hesitated.
'Dad, if I eat this entire curd Rice, will you give me whatever I ask for?'....... ....Oh sure, darling'.... 'Promise? '........ .........
'Promise'. I covered the pink soft hand extended by my daughter with
mine, and clinched the deal.
'Ask Mom also to give a similar promise', my daughter insisted.
My wife put her hand on Sindu's, muttering 'Promise'.
Now I became a bit anxious. 'Sindu dear, you shouldn't insist on getting a computer or any such expensive items.Dad does not have that kind of money right now. OK?'
'No, Dad. I do not want anything expensive'.Slowly and painfully, she finished eating the whole quantity.
I was silently angry with my wife and my mother for forcing my child eat something that she detested.
After the ordeal was through, Sindu came to me with her eyes wide with expectation.
All our attention was on her......... ....'Dad, I want to have my head shaved off, this Sunday!' was her demand.
'Atrocious!' shouted my wife, 'A girl child having her head shaved off?
Impossible!' 'Never in our family!' my mother rasped.'She has been watching too much of television. Our culture is getting totally spoiled with these TV programs!'
Sindu darling, why don't you ask for something else? We will be sad seeing you with a clean-shaven head.'
'No, Dad. I do not want anything else', Sindu said with finality.
'Please, Sindu, why don't you try to understand our feelings?' I tried to plead with her.
'Dad, you saw how difficult it was for me to eat that Curd Rice'. Sindu was in tears. 'And you promised to grant me whatever I ask for.Now, you are going back on your words. Was it not you who told me the story of King Harishchandra, and its moral that we should honor our promises no matter what?'
It was time for me to call the shots. 'Our promise must be kept.'
'Are you out your mind?' chorused my mother and wife.
'No. If we go back on our promises, she will never learn to honor her own.
Sindu, your wish will be fulfilled.'
With her head clean-shaven, Sindu had a round-face, and her eyes looked big and beautiful.
On Monday morning, I dropped her at her school. It was a sight to watch my hairless Sindu walking towards her classroom.She turned around and waved. I waved back with a smile.
Just then, a boy alighted from a car, and shouted, 'Sinduja, please wait for me!'
What struck me was the hairless head of that boy. 'May be, that is the in-stuff', I thought.
'Sir, your daughter Sinduja is great indeed!' Without introducing herself,
a lady got out of the car, and continued,' That boy who is walking along
with your daughter is my son Harish.He is suffering from... ... leukemia.'
She paused to muffle her sobs. Harish could not attend the school for the whole of the last month.He lost all his hair due to the side effects of the chemotherapy. He refused to come back to school fearing the unintentional but cruel teasing of the schoolmates.
'Sinduja visited him last week, and promised him that she will take care of the teasing issue.
But, I never imagined she would sacrifice her lovely hair for the sake of my son!
Sir, you and your wife are blessed to have such a noble soul as your daughter.'
I stood transfixed. And then, I wept. 'My little Angel, you are teaching me how self-less real love is!'
*The happiest people on this planet are not those who live on their own terms but
are those who change their terms for the ones whom they love..*
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Another Heart Touching One
-------------
I was walking around in a Big Bazaar store making shopping, when I saw a Cashier talking to a boy couldn't have been more
Than 5 or 6 years old. The Cashier said, 'I'm sorry, but you don't have enough money to buy this doll. Then the little boy turned to me and asked: ''aunty, are you sure I don't have enough money?''
I counted his cash and replied: ''You know that you don't have enough money to buy the doll, my dear.'' The little boy was
Still holding the doll in his hand. Finally, I walked toward him and I asked him who he wished to give this doll to. 'It's the
Doll that my sister loved most and wanted so much. I wanted to Gift her for her BIRTHDAY. I have to give the doll to my mommy so that she can give it to my sister when she goes there.'
His eyes were so sad while saying this. 'My Sister has gone to be with God. Daddy says that Mommy is going to see God very soon too, so I thought that she could take the doll with her to give it to my sister.'' My heart nearly stopped.
The little boy looked up at me and said: 'I told daddy to tell mommy not to go yet. I need her to wait until I come back from the mall.' Then he showed me a very nice photo of him where he was laughing. He then told me 'I want mommy to take my picture with her so my sister won't forget me.' 'I love my mommy and I wish she doesn't have to leave me, but daddy says that she has to go to be with my little sister...' Then he looked again at the doll with sad eyes, very quietly.
I quickly reached for my wallet and said to the boy. 'Suppose we check again, Just in case you do have enough money for the doll?'' 'OK' he said, 'I hope I do have enough..' I added some of my money to his with out him seeing and we started to count it.
There was enough for the doll and even some spare money. The little boy said: 'Thank you God for giving me enough money!' Then he looked at me and added, 'I asked last night before I went to sleep for God to make sure I had enough money to buy this doll, so that mommy could give It to my sister. He heard me!'' 'I also wanted to have enough money to buy a white rose for my mommy, but I didn't dare to ask God for too much.
But He gave me enough to buy the doll and a white rose. My mommy loves white roses.'
I finished my shopping in a totally different state from when I started. I couldn't get the little boy out of my mind. Then I remembered a local news paper article two days ago, which mentioned a drunk man in a truck, who hit a car occupied by a young woman and a little girl.
The little girl died right away, and the mother was left in a critical state. The family had to decide whether to pull the plug on the life-sustaining machine, because the young woman would not be able to recover from the coma. Was this the family of the little boy?
Two days after this encounter with the little boy, I read in the news paper that the young woman had passed away.. I couldn't stop myself as I bought a bunch of white roses and I went to the funeral home where the body of the young woman was exposed for people to see and make last wishes before her burial. She was there, in her coffin, holding a beautiful white rose in her hand with the photo of the little boy and the doll placed over her chest.
I left the place, teary-eyed, feeling that my life had been changed for ever. The love that the little boy had for his mother and his sister is still, to this day, hard to imagine. And in a fraction of a second, a drunk driver had taken all this away from him.
Sidhu one liners
That ball went so high it could have got an air hostess down with it.
There is light at the end of the tunnel for India, but it's that of an incoming train which will run them over.
Experience is like a comb that life gives you when you are bald.
This quote was made after Ganguly called Dravid for a run and midway sent him back and Dravid was runout in the third test against the West Indies at Barbados."Ganguly has thrown a drowning man both ends of the rope."
Sri Lankan score is running like an Indian taxi meter.
Statistics are like miniskirts, they reveal more than what they hide.
Wickets are like wives – you never know which way they will turn!
He is like Indian three-wheeler which will suck a lot of diesel but cannot go beyond 30!
The Indians are going to beat the Kiwis! Let me tell you, my friend, that the Kiwi is the only bird in the whole world which does not have wings!
As uncomfortable as a bum on a porcupine.
The ball whizzes past like a bumble bee and the Indians are in the sea.
The Indians are finding the gaps like a pin in a haystack.
The pitch is as dead as a dodo.
Deep Dasgupta is as confused as a child is in a topless bar!
The way Indian wickets are falling reminds of the cycle stand at Rajendra Talkies in Patiala…one falls and everything else falls!
Indian team without Sachin is like giving a Kiss without a Squeeze.
You cannot make Omelets without breaking the eggs.
Deep Dasgupta is not a Wicket Keeper, he is a goal keeper. He must be given a free transfer to Manchester United.
He will fight a rattlesnake and give it the first two bites too.
One, who doesn't throw the dice, can never expect to score a six.
This was uttered after Eddie Nichols, the third umpire, ruled Shivnarine Chanderpaul 'NOT OUT' in the second test at Port of Spain, T&T. "Eddie Nichols is a man who cannot find his own buttocks with his two hands."
Anybody can pilot a ship when the sea is calm.
Nobody travels on the road to success without a puncture or two.
You got to choose between tightening your belt or losing your pants.
The cat with gloves catches no mice.
Age has been perfect fire extinguisher for flaming youth.
You may have a heart of gold, but so does a hard-boiled egg.
He is like a one-legged man in a bum kicking competition.
The third umpires should be changed as often as nappies and for the same reason
Akhil-babu's letter to the Railway Department
Akhil Chandra Sen wrote this letter to the Sahibganj divisional railway office in 1909. It is on display at the Railway Museum in New Delhi. It was also reproduced under the caption Travelers' Tales" in the Far Eastern Economic Review.
"I am arrive by passenger train Ahmedpur station and my belly is too much swelling with jackfruit. I am therefore went to privy. Just I doing the nuisance that guard making whistle blow for train to go off and I am running with lotah in one hand and dhoti in the next when I am fall over and expose all my shocking to man and female women on platform. I am got leaved at Ahmedpur station.
This too much bad, if passenger go to make dung that dam guard not wait train five minutes for him. I am therefore pray your honor to make big fine on that guard for public sake. Otherwise I am making big report to papers."
Any guesses why this letter was of historic value?...............................It apparently led to introduction of toilets in trains.
Good Ones To Laugh
1. A FOOLish man tells a woman to STOP talking, but a WISE man tells her that she looks extremely BEAUTIFUL when her LIPS are CLOSED.
2. One GOOD way to REDUCE Alcohol consumption :
Before Marriage - Drink whenever you are SAD,
After Marriage - Drink whenever you are HAPPY
3. Three FASTEST means of Communication :
1. Tele-Phone
2. Tele-Vision
3. Tell to Woman
Need still FASTER - Tell her NOT to tell ANY ONE.
4. Love your friends not their sisters. Love your sisters not their friends.
5. A man got 2 wishes from GOD. He asked for the Best wine and Best Woman.
Next moment, he had the Best Wine and Mother Teresa next to him.
Moral : BE SPECIFIC
6. What is a BEST and WORST news you can hear at the SAME time ?
It is when your Girl Friend says YOU are the BEST KISSER among all your Friends.
7. Let us be generous like this : Four Ants are moving through a forest.
They see an ELEPHANT coming towards them. Ant 1 says : we should KILL him.
Ant 2 says : No, Let us break his Leg alone. Ant 3 says : No, we will just throw him away from our path.
Ant 4 says : No, we will LEAVE him because he is ALONE and we are FOUR.
8. If you do NOT have a Girl Friend - You are missing SOME thing in your life.
If you HAVE a Girl Friend - You are missing EVERY thing in your life.
9. Question : When do you CONGRATULATE someone for their MISTAKE.
Answer : On their MARRIAGE.
10. When your LIFE is in DARKNESS, PRAY GOD and ask him to free you from Darkness.
Even after you pray, if U R still in Darkness - Please PAY the ELECTRICITY BILL.
11. Why Government do NOT allow a Man to MARRY 2 Women.
Because per Constitution, you can NOT PUNISH TWICE for the same Mistake.
12. "A Ship is always safe at the shore - but that is NOT what it is built for" - Albert Einstein
Who is He?
After a long night of making love the young guy rolled over, was looking around when he noticed a framed picture of another man on a desk in the distance.
Naturally, the guy began to worry.
'Is this your husband?' he inquired nervously.
'No, silly,' she replied, snuggling up to him.
'Your boyfriend then?' he asked.
'No, not at all,' she said, nibbling away at his ear.
'Well, who is he then?' demanded the bewildered guy.
Calmly, the girl replied, 'That's me before the operation.'
Learn to Shut Up
On their wedding night, the young bride approached her new husband and asked for $20.00 for their first lovemaking encounter. In his highly aroused state, her husband readily agreed.
This scenario was repeated each time they made love, for more than 30 years, with him thinking that it was a cute way for her to afford new clothes and other incidentals that she needed.
Arriving home around noon one day, she was surprised to find her husband in a very drunken state. During the next few minutes, he explained that his employer was going through a process of corporate down sizing, and he had been let go.
It was unlikely that, at the age of 59, he'd be able to find another job.
Calmly, his wife handed him a bank book which showed more than thirty years of steady deposits and interest totalling nearly$1 million.
Then she showed him certificates of deposits issued by the bank which were worth over $2 million.
She explained that she had 'charged' him for sex, and these were the results of her savings and investments.
The husband was so astounded he could barely speak. Finally he found his voice and blurted out, 'If I'd had any idea what you were doing, I would have had sex only with you.'
That's when she shot him.
You know, that's what happens when you don't know when to keep your mouth shut...!!!
SMART QUESTIONS AND ANSWERS
Q.How can you drop a raw egg onto a concrete floor without cracking it?
A. Concrete floors are very hard to crack!
Q.If it took eight men ten hours to build a wall, how long would ittake four men to build it?
A. No time at all it is already built.
Q.If you had three apples and four oranges in one hand and fourapples and three oranges in the other hand, what would you have?
A. Very large hands.(Good one)
Q. How can you lift an elephant with one hand?
A. It is not a problem, since you will never find an elephant with one hand.
Q. How can a man go eight days without sleep?
A. No Probs, He sleeps at night.
Q. If you throw a red stone into the blue sea what it will become?
A. It will Wet or Sink as simple as that.
Q. What looks like half apple?
A : The other half.
Q. What can you never eat for breakfast?
A : Dinner.
Q.If it took eight men ten hours to build a wall, how long would ittake four men to build it?
A. No time at all it is already built.
Q.If you had three apples and four oranges in one hand and fourapples and three oranges in the other hand, what would you have?
A. Very large hands.(Good one)
Q. How can you lift an elephant with one hand?
A. It is not a problem, since you will never find an elephant with one hand.
Q. How can a man go eight days without sleep?
A. No Probs, He sleeps at night.
Q. If you throw a red stone into the blue sea what it will become?
A. It will Wet or Sink as simple as that.
Q. What looks like half apple?
A : The other half.
Q. What can you never eat for breakfast?
A : Dinner.
PROCDURE TO GENERATE RECORDS IN ANY TABLE
Table having the columns of datatypes NUMBER,VARCHAR2,CHAR,DATE
DON'T KNOW THE NO: OF THE COLUMNS IN THE TABLE.
JUST PASS THE NAME OF THE TABLE AND THE NO: OF THE RECORDS TO GENERATE.
create or replace procedure populate(N number,T_name varchar2)
as
count_col number:=0;
col_id number;
str varchar2(100):=NULL;
d_t varchar2(10);
d_l number;
chr varchar(50);
num number;
dat date;
t_n varchar2(10);
str_1 varchar2(100);
d_p number;
d_s number;
begin
select table_name,count(*) into t_n,count_col from cols where table_name=upper(T_name) group by table_name;
for i in 1..N loop
col_id:=1;
str:=NULL;
for j in 1..count_col loop
select data_type,data_length,column_id,data_precision,data_scale into d_t,d_l,col_id,d_p,d_s from cols where table_name=upper(T_name) and column_id=col_id;
if (d_t = 'VARCHAR2' OR d_t='CHAR')
then
select dbms_random.string('U',d_l) into chr from dual;
str:=str','''''chr'''';
--dbms_output.put_line(d_l);
--dbms_output.put_line(str' & 'chr' & 'col_id);
elsif d_t ='NUMBER'
then
select substr(abs(dbms_random.random),1,(d_p-d_s)) into num from dual;
str:=str','num;
-- dbms_output.put_line(d_l);
--dbms_output.put_line(str' & 'to_char(num)' & 'col_id);
else
select TO_DATE(TRUNC(DBMS_RANDOM.VALUE(2454071, 2454071+300)), 'J') into dat from dual;
--str:=str','dat;
str:=str','''''dat'''';
--dbms_output.put_line(d_l);
--dbms_output.put_line(str' & 'to_char(dat)' & 'col_id);
end if;
col_id:=col_id+1;
end loop;
str_1:=substr(str,2);
--dbms_output.put_line(to_char(str_1));
-- execute immediate 'insert into 't_n' values''('str')';
EXECUTE IMMEDIATE 'INSERT INTO ' t_n ' VALUES ''('str_1')';
-- insert into t_n values (str);
end loop;
execute immediate 'commit';
end;
/
DON'T KNOW THE NO: OF THE COLUMNS IN THE TABLE.
JUST PASS THE NAME OF THE TABLE AND THE NO: OF THE RECORDS TO GENERATE.
create or replace procedure populate(N number,T_name varchar2)
as
count_col number:=0;
col_id number;
str varchar2(100):=NULL;
d_t varchar2(10);
d_l number;
chr varchar(50);
num number;
dat date;
t_n varchar2(10);
str_1 varchar2(100);
d_p number;
d_s number;
begin
select table_name,count(*) into t_n,count_col from cols where table_name=upper(T_name) group by table_name;
for i in 1..N loop
col_id:=1;
str:=NULL;
for j in 1..count_col loop
select data_type,data_length,column_id,data_precision,data_scale into d_t,d_l,col_id,d_p,d_s from cols where table_name=upper(T_name) and column_id=col_id;
if (d_t = 'VARCHAR2' OR d_t='CHAR')
then
select dbms_random.string('U',d_l) into chr from dual;
str:=str','''''chr'''';
--dbms_output.put_line(d_l);
--dbms_output.put_line(str' & 'chr' & 'col_id);
elsif d_t ='NUMBER'
then
select substr(abs(dbms_random.random),1,(d_p-d_s)) into num from dual;
str:=str','num;
-- dbms_output.put_line(d_l);
--dbms_output.put_line(str' & 'to_char(num)' & 'col_id);
else
select TO_DATE(TRUNC(DBMS_RANDOM.VALUE(2454071, 2454071+300)), 'J') into dat from dual;
--str:=str','dat;
str:=str','''''dat'''';
--dbms_output.put_line(d_l);
--dbms_output.put_line(str' & 'to_char(dat)' & 'col_id);
end if;
col_id:=col_id+1;
end loop;
str_1:=substr(str,2);
--dbms_output.put_line(to_char(str_1));
-- execute immediate 'insert into 't_n' values''('str')';
EXECUTE IMMEDIATE 'INSERT INTO ' t_n ' VALUES ''('str_1')';
-- insert into t_n values (str);
end loop;
execute immediate 'commit';
end;
/
PO
Table Name...........Row_Count in a particular User
Getting Row_Count of all tables in a particular User
execute dbms_stats.gather_schema_stats ('scott');
select table_name, num_rows from user_tables order by table_name;
select table_name, num_rows from user_tables order by table_name;
ORACLE SQL Queries
Running Total ……….
select empno,sal,deptno, sum(sal)over(partition by deptno order by sal ) Running_Total
from emp;
Any Highest Salary…..
select a.*, row_number() over(order by sal desc) Order_Sal from emp a;
Max Sal in Every department. :
select empno,deptno,sal from emp where (sal,deptno) in(select max(sal),deptno from
emp group by deptno)
Retrieving Duplicate Employeesss.......
select empno,deptno from emp where (empno, deptno) in (select empno,deptno from emp group by
deptno,empno having count(deptno)>1)
Deleting Duplicate Records………..
Delete from emp a where rowid not in (select min (rowid) from emp b where a.empno = b.empno);
Dispaly employee records who gets more salary than the average salary in their department?
select a.* from emp a,
(select deptno,avg ( sal) avg_sal from emp group by deptno) b
where a.deptno= b.deptno and a.sal > b.avg_sal
Write a query to display alternate records from the employee table?
Select * from emp where (rowid,1) in (select rowid,mod(rownum,2) from emp);
Write a query to display employee records having same salary?
Select a.empno,a.ename,a.sal from scott.emp a where a.sal in
(select sal from scott.emp group by sal having count(*)>1)
What is output of this SQL where current value of sequence is 3?
Select seq.curval,seq.Nextval,seq.Nextval from dual ? Give reason?
U r output wll be...
CURRVAL NEXTVAL NEXTVAL
----------- ----------- -----------
3 3 3
Coz , sequence are stored objects in oracle and Incremented only when they are use with in executable code, let Us C.....
How to compare the total salary of all employee with a individual employee salary for a particular department.
Select empno, sal/( select sum ( a.sal ) from emp a ) total_sal
from emp;
Or
Select empno, sal, sal/(sum(sal) over()) sum_sal from emp;
Reverse Pivoting in Oracle
select id, sum(a1_amt) a1_amt,sum(a2_amt) a2_amt,sum(a2_amt) a3_amt from (
select a.id,
decode(a.name,'a1',sum(a.amount))a1_amt ,
decode(a.name,'a2',sum(a.amount)) a2_amt,
decode(a.name,'a3',sum(a.amount)) a3_amt
from
reverse_pivot a group by a.id,a.name) group by id
/
Or…
select a.id,sum(decode(a.name,'a1',amount)) A1,
sum(decode(a.name,'a2',amount)) A2,
sum(decode(a.name,'a3',amount)) A3
from reverse_pivot a group by a.id
I want to first display the employees of deptid=30, then all the employees of all the departments in asceding order within the same query
select * from emp order by decode(deptno,30,0,deptno);
To Generate the series of characters from 'A' to 'Z' and 'a' to 'z'.
Select chr(l+64), chr(l+96) from (select level l from dual connect by rownum between 1 and 26)
Max Salary on basis of location
Select f1.* from ( select a11.*, row_number() over (partition by loc order by sal desc) r
from (
select distinct a.*,c.loc from emp a, (select deptno, max(sal) sal from emp group by deptno) b,
dup_dept c
where a.deptno = b.deptno
and
a.deptno = c.deptno) a11 ) f1
where f1.r = 1
Or
Select d.* from (select c.*, row_number() over(partition by loc order by sal desc) rn from
(select a.*,loc from (select max(sal) sal,deptno from emp group by deptno)a,dept b where a.deptno=b.deptno)c) d
Where d.rn=1
/
select empno,sal,deptno, sum(sal)over(partition by deptno order by sal ) Running_Total
from emp;
Any Highest Salary…..
select a.*, row_number() over(order by sal desc) Order_Sal from emp a;
Max Sal in Every department. :
select empno,deptno,sal from emp where (sal,deptno) in(select max(sal),deptno from
emp group by deptno)
Retrieving Duplicate Employeesss.......
select empno,deptno from emp where (empno, deptno) in (select empno,deptno from emp group by
deptno,empno having count(deptno)>1)
Deleting Duplicate Records………..
Delete from emp a where rowid not in (select min (rowid) from emp b where a.empno = b.empno);
Dispaly employee records who gets more salary than the average salary in their department?
select a.* from emp a,
(select deptno,avg ( sal) avg_sal from emp group by deptno) b
where a.deptno= b.deptno and a.sal > b.avg_sal
Write a query to display alternate records from the employee table?
Select * from emp where (rowid,1) in (select rowid,mod(rownum,2) from emp);
Write a query to display employee records having same salary?
Select a.empno,a.ename,a.sal from scott.emp a where a.sal in
(select sal from scott.emp group by sal having count(*)>1)
What is output of this SQL where current value of sequence is 3?
Select seq.curval,seq.Nextval,seq.Nextval from dual ? Give reason?
U r output wll be...
CURRVAL NEXTVAL NEXTVAL
----------- ----------- -----------
3 3 3
Coz , sequence are stored objects in oracle and Incremented only when they are use with in executable code, let Us C.....
How to compare the total salary of all employee with a individual employee salary for a particular department.
Select empno, sal/( select sum ( a.sal ) from emp a ) total_sal
from emp;
Or
Select empno, sal, sal/(sum(sal) over()) sum_sal from emp;
Reverse Pivoting in Oracle
select id, sum(a1_amt) a1_amt,sum(a2_amt) a2_amt,sum(a2_amt) a3_amt from (
select a.id,
decode(a.name,'a1',sum(a.amount))a1_amt ,
decode(a.name,'a2',sum(a.amount)) a2_amt,
decode(a.name,'a3',sum(a.amount)) a3_amt
from
reverse_pivot a group by a.id,a.name) group by id
/
Or…
select a.id,sum(decode(a.name,'a1',amount)) A1,
sum(decode(a.name,'a2',amount)) A2,
sum(decode(a.name,'a3',amount)) A3
from reverse_pivot a group by a.id
I want to first display the employees of deptid=30, then all the employees of all the departments in asceding order within the same query
select * from emp order by decode(deptno,30,0,deptno);
To Generate the series of characters from 'A' to 'Z' and 'a' to 'z'.
Select chr(l+64), chr(l+96) from (select level l from dual connect by rownum between 1 and 26)
Max Salary on basis of location
Select f1.* from ( select a11.*, row_number() over (partition by loc order by sal desc) r
from (
select distinct a.*,c.loc from emp a, (select deptno, max(sal) sal from emp group by deptno) b,
dup_dept c
where a.deptno = b.deptno
and
a.deptno = c.deptno) a11 ) f1
where f1.r = 1
Or
Select d.* from (select c.*, row_number() over(partition by loc order by sal desc) rn from
(select a.*,loc from (select max(sal) sal,deptno from emp group by deptno)a,dept b where a.deptno=b.deptno)c) d
Where d.rn=1
/
DATAWAREHOUSING CONCEPTS
1.What is a DataWareHouse?Explain The Characteristics?
Integ : Data from separate sources must be put into a consistent format thru Data Transformations and Data Cleansing.
Non-Volatile : Data Once entered into the warehouse can’t be changed.
Time-Variant : Creates a time dimension to the Data ware house. Can view patterns and trends over time.
Online Transactional Processing
|
Online Analytical Processing
|
Functional : Day to Day Operations
|
Decision Support
|
Db Design : Application Oriented
|
Subject Oriented.
|
Data : Current Up to date
|
Historical Data
|
Detailed, Flat,Relational
|
Summarized, Isolated
|
Higly Normalized
|
Highly De-Normailized
|
Unit of work : Short, Simple, Transaction
|
Complex Query
|
3.Diff between Datawarehouse and DataMart?
A data warehouse is for very large databases (VLDBs)
|
A data mart is for smaller databases.
|
A data warehouse is a database designed to support a broad range of decision tasks in a specific organization.
|
A data mart is a selected part of the data warehouse which supports specific decision support application requirements of a company’s department
Is a Smaller Subset of Data ware House.
|
Has More Subject-Oriented Areas
|
Has Less Subject – Oriented Areas
|
Size is > 100 GB
|
Size is <>
|
Running Ad hoc(unplanned) Queries from a huge data warehouse takes long time.
|
Running ad hoc queries in data marts allow the efficient execution of predicted queries.
|
It is Enterprise Level One
|
It is Smaller Scale One.
|
4. What are Surrogate Keys?
A unique Identifier or Number for each row , which is used as a Substitute for Natural Key such as Customer no in Customer table.
Used as a primary key because normal natural key will be changing or updating.
5.What is Star Schema, Snow Flake Schema,Fact Constellation Schema/(Galaxy Schema)?
A Star Schema is a Central Fact table is Surrounded by De-Normalized Dimensions.
A Snow Flake Schema is a Central Fact table is surrounded by Normalized Dimensions, split Dimension table data into other tables.
A Fact Constellation Schema is the one in which multiple fact tables share the dimension tables. Can also be called collection of stars (Galaxy Schema).
6.Advantages Of Star Schema Over Snow Flake Schema, Drawbacks of Snow Flake Schema?
ADVANTAGES OF STAR SCHEMA
|
DRAWBACKS OF SNOW FLAKE
|
Easy to Understand
|
Time Consuming Joins
|
Easy to define Hierarchies
|
Report Generation Slow
|
Reduces No: of Physical Joins
|
7.What is Dimensional Modelling?
The way to identify which information belongs to a central fact table and which information belongs to its associated dimension tables.
8.What is a Junk Dimension?
It is a convenient way to separate the random attributes in a dimension into another dimension.
A "junk" dimension is a collection of random transactional codes, flags and/or text attributes that are unrelated to any particular dimension. The junk dimension is simply a structure that provides a convenient place to store the junk attributes. A good example would be a trade fact in a company that brokers equity trades.
The fact would contain several metrics (principal amount, net amount, price per share, commission, margin amount, etc.) and would be related to several dimensions such as account, date, rep, office, exchange, etc. This fact would also contain several codes and flags that were related to the transaction rather than any of the dimensions ... such as origin code (that indicates whether the trade was initiated with a phone call or via the Web), a reinvest flag (that indicates whether or not this trade as was the result of the reinvestment of a dividend payout) and a comment field for storing special instructions from the customer. These three attributes would normally be removed from the fact table and stored in a junk dimension ... perhaps called the trade dimension. In this way, the number of indexes on the fact table would be reduced, and performance (not to mention ease of use) would be enhanced. Hope this helps.
9.How do u load data into Date Dimension?
By using the Maxdate and MinDate.,with a stored procedure.
10.What are Additive Facts,Semi-Additive Facts,Non-Additive Facts?
Additive: Additive facts are facts that can be summed up through all of the dimensions in the fact table.
Semi-Additive: Semi-additive facts are facts that can be summed up for some of the dimensions in the fact table, but not the others.
Non-Additive: Non-additive facts are facts that cannot be summed up for any of the dimensions present in the fact table.
Semi-Additive: Semi-additive facts are facts that can be summed up for some of the dimensions in the fact table, but not the others.
Non-Additive: Non-additive facts are facts that cannot be summed up for any of the dimensions present in the fact table.
11. What is Staging Area?
Provides a place and an area with a set of functions to clean, change, combine, convert, deduplicate and prepare source data for storage and use in the data warehouse.
12.What is Factless Fact? What are different types?
A Fact table which do not have any facts.They may consist of nothing but keys.
Types :
*. Event Tracking. : It is a table that records an event. Eg: Student Tracking System that detects each student attendance event each day.
*. Coverage Tables : These are frequently needed when a primary fact table in a dimensional data warehouse is sparse(small).
13.What is ETL & CDC?
ETL-(Extraction,Transaction & Loading)Data Extraction takes data from source systems, necessary transformations takes place and data load takes extracted data and loads it into the data warehouse.(where the transformation takes place)
CDC-(Change Data Capture) Captures the data which is changing and will be used for transformations.(Which data should be picked up)
14.Explain the Datawarehouse LifeCycle?
Extraction - As a first step, heterogeneous data from different online transaction processing systems is extracted. This data becomes the data source for the data warehouse.
Cleansing/transformation - The source data is sent into the populating systems where the data is cleansed, integrated, consolidated, secured and stored in the corporate or central data warehouse.
Distribution - From the central data warehouse, data is distributed to independent data marts specifically designed for the end user.
Analysis - From these data marts, data is sent to the end users who access the data stored in the data mart depending upon their requirement.
15. What is the aim/objective of having a data warehouse? And who needs a data warehouse? Or what is the use of Data Warehousing?
Data warehousing technology comprises a set of new concepts and tools which support the executives, managers and analysts with information material for decision making.
The fundamental reason for building a data warehouse is to improve the quality of information in the organization.
The main goal of data warehouse is to report and present the information in a very user friendly form.
16. What is Confirmed Dimension ,Confirmed Fact , Stoved Pipe?
- Dimensions which are 100% shared across Star Schema is called Confirmed Dimension.
- Keeping the consistency of same unit of measurement and same background calculation across schema is called Confirmed Fact.
- Any Data ware house that are not having Confirmed Fact/Dimension are called Stoved Pipes.
- 100% shared---Tables Structure should be consistent.
17.What is S.C.D? What are different Types?
Slowly changing dimensions are dimension tables that have slowly increasing dimension data, as well as updates to existing dimensions.
Use the Type 3 Dimension mapping to update a slowly changing dimension table when you want to keep only current and previous versions of column data in the table. Both versions of the specified column or columns are saved in the same row.
18. What is S.P.T and S.G.D?
A dimension that has a key only, no additional attributes.
I have a fact table that stores insurance contracts and one important dimension is the year signed. So the fact table does have many columns, like CUSTOMER_ID, CONTRACT_ID, etc and one column YEAR_SIGNED as varchar(4). The CUSTOMER_ID is the foreign key column to the DIM_CUSTOMER with all the customer date, name address, .... CONTRACT_ID relates to the DIM_CONTRACT with all the contract specific information. Any YEAR_SIGNED? Should I really have a DIM_YEAR_SIGNED and it will have one column only. What other attributes should a year have?
Therefore, we do not create an explicit dimension table and call that YEAR_SIGNED column a degenerated dimension.
Strings Embedded with Commas enclosed with " "
Flat File... Comma Delimiter....Strings Embedded with Commas enclosed with " "....
Eg :
Id,Name,Address,Amt
123,"Ramesh Babu","2/16,KAD Road,GZB",50000
Solution :
In the Delimiters Section of Flat File Definition Set the properties like :
Column....... ,
Row..........{New Line}
Text.........." (By default this is None}
Dataflow In a Infinite Loop searching for any Flat file Existance.
Job Is executed 1 time.
Check for Any Flat file(Column structure will be same) exists in "X" Folder.
Name of the flat file changes every time. But the Column Structure will be same.
If any Flat file exists then Dataflow will be executed.
Once the data is loaded into the target table the Source flat file in "X" folder should be deleted.
Dataflow will be in a Infinite Loop searching for any Flat file Existance.
Place a Script & fill the following code:$G_Stop =1;Place a While Loop Icon i.e available on the right hand side slider:put the following condition :
($G_Stop = 1)
Inside the While Loop :
Place a Script & fill the following code :exec('D:\Flat\b.bat','',2);
$G_a =file_exists('D:\zz.txt');
Code of b.bat :
cd\
d:
cd d:\flat
if not exist *.txt del d:\zz.txt
if exist *.txt dir > d:\zz.txtPlace a Conditional Icon next to the Script :
Put the following condition :($G_a=1)Inside the If Condition :
Place the Dataflow which u want to execute.
Next to it place a script and fill the following code.exec('D:\Flat\Del_Flat.bat','',2);
Code of Del_Flat.bat :
cd\
d:
cd d:\flat
del *.txt
Name of the flat file changes every time. But the Column Structure will be same.
If any Flat file exists then Dataflow will be executed.
Once the data is loaded into the target table the Source flat file in "X" folder should be deleted.
Dataflow will be in a Infinite Loop searching for any Flat file Existance.
Place a Script & fill the following code:$G_Stop =1;Place a While Loop Icon i.e available on the right hand side slider:put the following condition :
($G_Stop = 1)
Inside the While Loop :
Place a Script & fill the following code :exec('D:\Flat\b.bat','',2);
$G_a =file_exists('D:\zz.txt');
Code of b.bat :
cd\
d:
cd d:\flat
if not exist *.txt del d:\zz.txt
if exist *.txt dir > d:\zz.txtPlace a Conditional Icon next to the Script :
Put the following condition :($G_a=1)Inside the If Condition :
Place the Dataflow which u want to execute.
Next to it place a script and fill the following code.exec('D:\Flat\Del_Flat.bat','',2);
Code of Del_Flat.bat :
cd\
d:
cd d:\flat
del *.txt
Dynamic Target File Names in BODI
Pre-Requisites :
In Data Files Section Set the properties like
Root Directory : D:\
File Location : $Dynamic_Name
Code in the Script File :
$Dynamic_Name='DYNAMIC_'to_char(sysdate(),'YYYY.MM.DD.HH.MI.SS')'.txt';
exec('D:\dy.bat',$Dynamic_Name,8);
Code in Batch File :
d:
echo %1 > d:\z.txt
type k.txt > %1
Root Directory : D:\
File Location : $Dynamic_Name
Code in the Script File :
$Dynamic_Name='DYNAMIC_'to_char(sysdate(),'YYYY.MM.DD.HH.MI.SS')'.txt';
exec('D:\dy.bat',$Dynamic_Name,8);
Code in Batch File :
d:
echo %1 > d:\z.txt
type k.txt > %1
Custom Function For Different Date Formats
Script of Custom Function For Converting Different Date Formats into a single Date Format" YYYYMMDD"
if( is_valid_date($P_Date_In ,'DD/MM/YYYY') = 1 AND SUBSTR($P_Date_In,3,1) <> '-')
begin
$L_Date_Out = TO_CHAR(TO_DATE($P_Date_In,'DD/MM/YYYY'),'YYYYMMDD') ;
print($P_Date_In'......1');
return($L_Date_Out);
end
else
begin
if( is_valid_date($P_Date_In ,'DD-MM-YYYY') = 1 AND SUBSTR($P_Date_In,3,1) = '-')
begin
$L_Date_Out = TO_CHAR(TO_DATE($P_Date_In,'DD-MM-YYYY'),'YYYYMMDD') ;
print($P_Date_In'......2');return($L_Date_Out);
end
else
begin
if( is_valid_date($P_Date_In ,'MM/DD/YYYY') = 1 AND SUBSTR($P_Date_In,3,1) <> '-')
begin$L_Date_Out = TO_CHAR(TO_DATE($P_Date_In,'MM/DD/YYYY'),'YYYYMMDD') ;
print($P_Date_In'......3');return($L_Date_Out);
end
else
begin
if( is_valid_date($P_Date_In ,'MM/DD/YYYY') = 1 AND SUBSTR($P_Date_In,3,1) <> '-')
begin
$L_Date_Out = TO_CHAR(TO_DATE($P_Date_In,'MM/DD/YYYY'),'YYYYMMDD') ;
print($P_Date_In'......4');return($L_Date_Out);
end
else
begin
if( is_valid_date($P_Date_In ,'MMDDYYYY') = 1 AND SUBSTR($P_Date_In,3,1) <> '-')
begin
$L_Date_Out = TO_CHAR(TO_DATE($P_Date_In,'MMDDYYYY'),'YYYYMMDD') ;
print($P_Date_In'......5');
return($L_Date_Out);
end
else
begin
if( is_valid_date($P_Date_In ,'YYYYMMDD') = 1 AND SUBSTR($P_Date_In,5,1) <> '-')
begin
print($P_Date_In'......6');
return($L_Date_Out);
end
else
begin
if( is_valid_date($P_Date_In ,'MM-DD-YYYY') = 1 AND SUBSTR($P_Date_In,3,1) = '-')
begin
$L_Date_Out = TO_CHAR(TO_DATE($P_Date_In,'MM-DD-YYYY'),'YYYYMMDD') ;
print($P_Date_In'......7');
return($L_Date_Out);
end
else
begin
if( is_valid_date($P_Date_In ,'YYYY-MM-DD') = 1 AND SUBSTR($P_Date_In,5,1) = '-')
begin
$L_Date_Out = TO_CHAR(TO_DATE($P_Date_In,'YYYY-MM-DD'),'YYYYMMDD') ;
print($P_Date_In'......8');return($L_Date_Out);
end
else
begin
if( is_valid_date($P_Date_In ,'YYYY/MM/DD') = 1 AND SUBSTR($P_Date_In,5,1) <> '-')
begin
$L_Date_Out = TO_CHAR(TO_DATE($P_Date_In,'YYYY/MM/DD'),'YYYYMMDD') ;
print($P_Date_In'......9');return($L_Date_Out);
end
else
begin
if( is_valid_date($P_Date_In ,'DDMMYYYY') = 1 AND SUBSTR($P_Date_In,3,1) <> '-')
begin
$L_Date_Out = TO_CHAR(TO_DATE($P_Date_In,'DDMMYYYY'),'YYYYMMDD') ;
print($P_Date_In'......10');
return($L_Date_Out);
end
else
begin
print($P_Date_In'......11');
return($P_Date_In);
end
end
end
end
end
end
end
end
end
end
Subscribe to:
Posts (Atom)
get it
http://hinekv1.ddns.net:8008/get.php?username=Varga_Florentina1tv&password=j5MgWBs18t&type=m3u_plus&output=mpegts http://www.lo...