Tuesday, January 8, 2013

ORDER BY clause does not work in sub query

the ORDER BY clause in the SQL (any database) does not work if we use it inside a sub query, because it sorts the result set after completing all filtering conditions and calculations.

ORDER BY clause has the last priority among all clauses (i.e. SELECT, WHERE, GROUP BY, HAVING..etc) in SQL because its nothing to do with the calculations, its just for the presentation of the resulted data set. the following query doesn't work.


SELECT * FROM dual WHERE dummy IN (SELECT * FROM dual ORDER BY dummy);

instead following query will work.


SELECT * FROM dual WHERE dummy IN (SELECT * FROM dual)  ORDER BY dummy;

Wednesday, April 28, 2010

Ignited Minds: 20 innovators who are changing our lives

Sheikh Jehangir cannot read or write, hasn't been trained in any vocational skill and started working at the age of 11 to support his family. Yet, the 50-year-old car painter in Jalgaon, Maharashtra, has a patent to his name, and has applied for a second one. His latest innovation, a scooter-powered flourmill created to help his wife grind wheat even during long power cuts, inspired an invention featured in the monster hit 3 Idiots. Jehangir's shop was removed from the roadside in a cleanliness drive and even though he was promised a new one by the government, he has not received it yet. What's more, when Jehangir applied to a public sector for a loan to support his innovation, he was refused one without a collateral of Rs 15 lakh.

Wednesday, March 31, 2010

The Power of the human mind

Dear Friends,

Some thing to chew... take a break..
another example to show English is a funny language...! !!???


I can read it , can You?
fi yuo cna raed tihs,
yuo hvae a sgtrane mnid too.
Cna yuo raed tihs?
Olny 55 plepoe out of 100 can.

Sunday, March 21, 2010

JAVA interview Basic questions and answers for freshers

1)What is OOPs? 
Ans: Object oriented programming organizes a program around its data,i.e.,objects and a set of well defined interfaces to that data.An object-oriented program can be characterized as data controlling access to code.

2)what is the difference between Procedural and OOPs?
Ans: a) In procedural program, programming logic follows certain procedures and the instructions are executed one after another. In OOPs program, unit of program is object, which is nothing but combination of data and code.

b) In procedural program,data is exposed to the whole program whereas in OOPs program,it is accessible with in the object and which in turn assures the security of the code.

Saturday, March 20, 2010

Java Program for intializing and printing a Two-dimensional array

public class Twoarray
{
    public static void main(String args[])
    {
        int a[][]={{5,2},{1,4},{2,3}};
    System.out.println("given Two-dimensional array is: ");
        for(int i=0;i<3;i++)
        {
            for(int j=0;j<2;j++)
            {
                System.out.print(a[i][j]);
            }
        System.out.print(" ");
        }
    }
}

Java Program for printing the Fibonacci Series

class Fibonacci
{
 public static void main(String[] args)
 {
 int a=0,b=1,s=0;      
 System.out.println("Fibonacci series printing 10times:"); System.out.println(a);
 System.out.println(b);
 int i=0;
 while(i<10)
     {
            s=a+b;
            a=b;
            b=s;
            System.out.println(s);
            i++;
            }
    }
}

Friday, March 19, 2010

JAVA Program for Bubblesort (Ascending order) of a Single Dimensional Array

class Bubblesort
{
            public static void main(String[] args)
    {
        int a[]={4,1,8,3,5};
        int temp=0;
        System.out.println("given array: ");
        for(int j=0;j<5;j++)
        {
                System.out.print(a[j]);
        }
        System.out.println("");
        System.out.println("Bubble sort for ascending order");
        for(int j=0;<(a.length-1);j++)
        {
            for(int i=0;<(a.length-1);i++)
            {
                if(a[i]>a[i+1])
                {
                    temp=a[i];
                    a[i]=a[i+1];
                    a[i+1]=temp;
                }
               
            }
        }
            System.out.println("the sorted array is:");
            for(int k=0;k<5;k++)
        {
                System.out.print(a[k]);
        }
    }
}

JAVA Program to Print the season of a given month

public class Season
{
public static void main(String[] args)
{
int month=4;
switch(month)
{
case 1:
case 2:
case 3:
System.out.println("Automn");
break;
case 4:
case 5:
case 6:
System.out.println("summer");
break;

case 7:
case 8:
case 9:
System.out.println("winter");
break;
case 10:
case 11:
case 12:
System.out.println("spring");
break;
default:
System.out.println("Wrong input");

}
}
}
Download this program Here

JAVA Program to to find whether the given number is Armstrong or not

class Armstrong
{
public static void main(String[] args)
{
int n=143,temp,a=0,i=1;
temp=n;
while(i>0)
{
i=n%10;
a=(i*i*i)+a;
n=n/10;
}
if(a==temp)
System.out.println("the given number is armstrong");
else
System.out.println("the given number is not armstrong");
}
}
Download this program Here

JAVA Program to Print he Default Values

class Defaultvalues
{
static int a;
static byte b;
static char c;
static short s;
static long l;
static float f;
static double d;
static boolean bl;
public static void main(String[] args)
{
 System.out.println("Default values of various data types");
  System.out.println("int: "+a);
System.out.println("byte: "+b);
System.out.println("char: "+c);
System.out.println("short: "+s);
System.out.println("long: "+l);
System.out.println("float: "+f);
System.out.println("double: "+d);
System.out.println("boolean: "+bl);
}
}
Download this program Here

Wednesday, March 3, 2010

‘A’ TO ‘Z’ OF STRESS MANAGEMENT

  • Always take time for yourself, at least30 minutes per day.
  • Be aware of your own stress meter:Know when to step back and cool down.
  • Concentrate on controlling your ownsituation, without controlling everybodyelse.
  • Daily exercise will burn off the stresschemicals.
  • Eat lots of fresh fruit, veggies, bread andwater, give your body the best for it toperform at its best.
  • Forgive others, don't hold grudges and betolerant -- not everyone is as capable as you.
  • Gain perspective on things, howimportant is the issue?
  • Hugs, kisses and laughter: Have fun anddon't be afraid to share your feelingswith others.
  • Identify stressors and plan to deal withthem better next time.
  • Judge your own performance realistically;don't set goals out of your own reach.
  • Keep a positive attitude, your outlook willinfluence outcomes and the way others treatyou.
  • Limit alcohol, drugs and other stimulants,they affect your perception and behaviour.
  • Manage money well, seek advice and save atleast 10 per cent of what you earn.
  • No is a word you need to learn to use withoutfeeling guilty.
  • Outdoor activities by yourself, or with friendsand family, can be a great way to relax.
  • Play your favourite music rather thanwatching television.
  • Quit bad habits.
  • Relationships: Nurture and enjoy them,learn to listen more and talk less.
  • Sleep well, with a firm mattress and asupportive pillow; don't overheat yourselfand allow plenty of ventilation.
  • Treat yourself once a week with a massage,dinner out, the movies: Moderation is the key.
  • Understand things from the other person'spoint of view.
  • Verify information from the sourcebefore exploding.
  • Worry less, it really does not get thingscompleted better or quicker.
  • Xpress: Make a regular retreat to yourfavourite space, make holidays part ofyour yearly plan and budget.
  • Yearly goal setting: Plan what you wantto achieve based on your priorities inyour career, relationships, etc.
  • Zest for life: Each day is a gift, smileand be thankful that you are a part ofthe bigger picture.

Friday, February 12, 2010

Keep Walking.....

The Organs of your body have their sensory touches at the bottom of your foot, if you massage these points you will find relief from aches and pains as you can see the heart is on the left foot.



God created our body so well that he thought of even this. He made us walk so that we will always be pressing these pressure points and thus keeping these organs activated at all times. So, keep walking...

Does Your Blood Type Reveal Your Personality?????

Accord ing to a Japanese institute that does research on blood types, there are certain personality traits that seem to match up with certain blood types. How do you rate?

TYPE O:
You want to be a leader, and when you see something you want, you keep striving until you achieve your goal. You are a trend-setter, loyal, passionate, and self-confident. Your weaknesses include vanity and jealously and a tendency to be too competitive.

TYPE A:
You like harmony, peace and organization. You work well with others, and are sensitive, patient and affectionate. Among your weaknesses are stubbornness and an inability to relax.

TYPE B:
You're a rugged individualist, who's str aightforwa rd and likes to do things your own way. Creative and flexible, you adapt easily to any situation. But your insistence on being independent can sometimes go too far and become a weakness.

TYPE AB:
Cool and controlled, you're generally well liked and always put people at ease. You're a natural entertainer who's tactful and fair. But you're standoffish, blunt, and have difficulty making decisions.

Friday, February 5, 2010

Why Teachers are So Stressed...check it out!

When in School we always wondered why teachers always seemed so mad
Now we know the reason….coz they are so stressed out kids, Why??????? Read below the essays to know
Want more?................... Check out these Mathematics geniuses…

Wednesday, February 3, 2010

In 24 Hours An Average Human.........

1) HEART beats 1,03,689 times.

2) LUNGS respire 23,045 times.

3) BLOOD flows 16,80,000 miles.

4) NAILS grow 0.00007 inches

5) HAIR grows 0.01715 inches

6) Take 2.9 pounds WATER (including all liquids)

7) Take of 3.25 pounds FOOD.

8) Breathe 438 cubic feet AIR.

9) Lose 85.60, BODY TEMPERATURE.

10) Produce 1.43 pints SWEAT.

11) Speak 4,800 WORDS.

12) During SLEEP move 25.4 times.

Tuesday, February 2, 2010

Innocent Boy............Asks..........

Small boy opens the door and looks at his sister's boyfriend,
and
asks innocently
"Every day u come to meet my sister, don't you have your own sister"

Google Summer Of Code 2010

Organised By: Google

Important Dates :

  • Opening of application for Mentoring Organization: March 8, 2010
  • Last date for closing of pplication for Mentoring Organization: March 12, 2010
  • Opening of application for Students: March 29, 2010
  • Last date for closing of pplication for Students: April 9, 2010 a
  • Eligibility Criteria: Open to persons above 18 years

This is a great chance for those looking to contribute to open source and also looking to do something during the summer. Google Summer of Code is a program that offers student developers stipends to write code for various open source projects. Here one can participate as a mentor or as a student developer. Age limit : Above 18 Only students can participate in this as developer.

Monday, February 1, 2010

Indian startup to help copy your brain on computers

Thiruvananthapuram: Now, Swiss scientists and PIT Solution, a little-heard of IT startup in Technopark in Kerala will be working on the Blue Brain Project, the world's first comprehensive attempt to reverse-engineer the mammalian brain, reports Financial Express.

The $3 billion project is expected to be completed by 2018, said Brain Mind Institute of Swiss Federal Institute Director Henry Markram to Financial Express. The project is billed as an attempt to build a computerized copy of a brain - starting with a rat's brain, and then progressing to a human brain-inside one of the world's most powerful computers. It is an international project, propelled by Swiss Federal Institute, and involves several countries and ethics monitoring by UN bodies. India is yet to be part of the project.

Rahman joins the list of Grammy winners from India

Mumbai: Music Composer AR Rahman is not the first Indian to win a Grammy Award.

In the 51-year history of the Grammy Awards, only three Indians have had the honour of being Grammy Award winners and that too only when they collaborated with other western musicians.

Sitar maestro Pandit Ravi Shankar was the first Indian musician to bag a Grammy way back in 1967 for his performance West Meets East with violinist Yehudi Menuhin in the Best Chamber Music Performance category.

He followed it up with a second trophy in 1972 when The Concert For Bangladesh featuring him, George Harrison, Bob Dylan, Leon Russell, Ringo Starr, Billy Preston, Eric Clapton and Klaus Voormann was named Album Of The Year.