An Idea can change your life.....

Sunday, April 27, 2008

Listen to Hyderabad Radio on web

RadioCity 91.1 FM - Live from Hyderabad
RadioMirchi 98.3 FM - Live from Hyderabad
Rainbow 101.9 FM - Live from Hyderabad
S FM 93.5 - Live from Hyderabad

Check out here Radio

Saturday, April 26, 2008

differences between EXECUTE() and SP_EXECUTESQL()

EXECUTE sp_executesql
N'SELECT * FROM AdventureWorks.HumanResources.Employee
WHERE ManagerID = @level',
N'@level tinyint',
@level = 109,@MessageIn Output;

1. EXECUTE() :: If we write a query which takes a parameter lets say "EmpID". When we run the query with "EmpID" as 1 and 2 it would be creating two different cache entry (one each for value 1 and 2 respectively).

It means for Unparameterised queries the cached plan is reused only if we ask for the same id again. So the cached plan is not of any major use.

2. SP_EXECUTESQL() :: In the similar situation for "Parameterised" queries the cached plan would be created only once and would be reused 'n' number of times. Similar to that of a stored procedure. So this would have better performance.

A Simple usage of Replace Function

REPLACE ( string_expression1 , string_expression2 , string_expression3 )

SELECT Replace(' Rocks!', 'Rocks', 'Rolls')

Saturday, April 19, 2008

Tree view of hierarchy using the cte

One of the uses of Common type expression


AS (SELECT EmployeeId,



0 AS Hlevel

FROM OrgEntitiesMaster

WHERE Parentid = 0


SELECT H.EmployeeId,



Hlevel + 1

FROM OrgEntitiesMaster H


ON H.Parentid = P.EmployeeId




Wednesday, April 09, 2008

Dpack Visual Studio Addon

DPack is a FREE collection of Microsoft Visual Studio 2005 and 2008 tools. DPack is designed to greatly increase developer's productivity, automate repetitive processes and expand upon some of Microsoft Visual Studio features.



VS 2005

VS 2008

Monday, April 07, 2008

The Semantics of override

Declaring a method as "sealed" means that you ARE NOT ALLOWED to override that method. It is enforced by the compiler.

Calling a method of a derived class through its base class is polymorphism, . The new keyword creates a method that will not be callable through a method of the base class(es).

So, the purpose of the sealed keyword? It prevents inheriting classes to override the method. And let me perfectly clear: overriding a method in a derived class is not the same as declaring a method with same name and the new modifier (or without the override modifier) in a derived class.

Public class A
public virtual void MethodX() {}
public virtual void MethodY() {}

public class B : A
public override void MethodX() {}
public override sealed void MethodY() {}

public class C : B
public override void MethodX() {}
// public override void MethodY() {} // NOT ALLOWED, COMPILER ERROR
public new void MethodY() {}


A varA = new C();
A varB = new B();
C varC = new C();

varA.MethodX(); // Calls C.MethodX()
varA.MethodY(); // Calls B.MethodY() because MethodY is not overriden in class C
varB.MethodX(); // Calls B.MethodX()
varB.MethodY(); // Calls B.MethodY()
varC.MethodX(); // Calls C.MethodX()
varC.MethodY(); // Calls C.MethodY()

So the only way to call C.MethodY() is by explicitly creating a variable of type C. MethodY of class C is not a virtual

Sunday, April 06, 2008

Do Your Best Today

Friends, I would like to share with you a great message given by my teacher fromKalidasa's Shakuntalam 2000 years ago.
Look to this day! For it is life, the very life of life. In its brief course Lie all the verities and realities of your existence; The bliss of growth The glory of actionSplendor of achievement, For yesterday is but a dream And tomorrow is only a vision, But today well lived, makes every yesterday a dream of happiness And tomorrow a vision of hope.Look well, therefore to this day! Such is the salutation to the dawn.
Every day is very importantin a student's life. If you do the best today, you will harvest the best. Next, you should also build confidence. When I was in the 5th standard, many of us used to get less than 40 marks in mathematics. My maths teacher evolved a method of teaching and creation of confidence for the whole class. He conducted a class and gave us an exercise of 10 problems. In that exercise, more than 90% of the class including me, got 100 out of 100. That day onwards our mathematics performance improved. Only after a few years we realized that our teacherinjected confidence in us, to feel that "I can do it". To succeed in life each of you has to cultivate the confidence that "I can do it", then the nation will build the confidence that "we can Do it"
APJ.Abdul Kalam

Saturday, April 05, 2008

Inspiring Quotes

Inspiring Quotes

1) If a drop of water falls in lake there is no identity. But if it falls on a leaf of lotus it shine like a pearl. so choose the best place where you would shine..

2) Never expect things to happen..struggle and make them happen. never expect yourself to be given a good value..create a value of your own

3) Falling down is not defeat...defeat is when your refuse to get up...

4) Ship is always safe at shore... but is not built for it

5) When your successful your well-wishers know who you are when you are unsuccessful you know who your well-wishers are

6) It is great confidence in a friend to tell him your faults; greater to tell him/her

7) "To the world you might be one person, but to one person you just might be the world

8) "Even the word 'IMPOSSIBLE' says 'I M POSSIBLE' "

Wednesday, April 02, 2008

Think Simple to Solve Complex Problems.

Think Simple to Solve Complex Problems.

1. When NASA began launching astronauts into space, they found out that the astronauts' pens wouldn't work at zero gravity (ink wouldn't flow down to the writing surface). It took them one decade and $12 million to solve this problem. They developed a pen that worked at zero gravity, upside down, underwater, on practically any surface including crystal, and at temperatures ranging from below freezing to over 300 degrees C.

And what did the Russians do? The Russians used a pencil.

2. One of the most memorable case studies on Japanese management techniques was the case of the empty soap box, which occurred in one of Japan's biggest cosmetics companies. The company received a complaint that a consumer had bought a soap box that was empty. Immediately the authorities isolated the problem to the assembly line, which transported all the packaged boxes of soap to the delivery department. For some reason, one soap box went through the assembly line empty. Management asked its engineers to solve the problem. Post-haste, the
engineers worked hard to devise an X-ray machine with high-resolution monitors manned by two people to watch all the soap boxes that passed through the line, to make sure they were not empty. No doubt, they worked hard and they worked fast but they spent whoopee amount of time and money to do so.

But when a rank-and-file employee in a small company was posed with the same problem, he did not get into the complications of X-rays, etc. but instead came out with another solution. He bought a strong industrial electric fan and pointed it at the assembly line. He switched the fan on, and as each soap box passed the fan, it simply blew the empty boxes out of the line.

3. A 50 feet long trailer having 48" wheels got stuck while entering a midtown tunnel in New York because it was approximately 2.5 feet taller than the height of the tunnel. The fire department and the state department of transportation spent the whole day searching for a solution, to no avail.

Then a child, aged about 9 years, asked his father, "Why can't they take out the air from the tyre tubes? The height will automatically come down."