Archive for January, 2012

Top 5 things while Mentoring? January 28th, 2012

Vinod Kumar

This is a very sensitive topic because I have had people come to me and asked for mentoring – career or business related. I am all ears and out there to help as many people as I can, most of the time it is just the direction I give and want the passion to take over to guide them rest of the way. So that has always been my style. Taking a step back to think, what is it that I look for in my mentors and what do I look for people who come to me with this request? Personally, I am gifted to have met tons of interesting people and have made many as my mentor. The list is literally a big one – trust me :).

Mentor is someone who praises when you deserve it and gives heads-up when trouble is coming probably eve before you even have noticed it.

I see multiple qualities in a mentor to guide me. These may not align to your needs but I can assure you that these are non-negotiable for me. These are my Top 5 –

Take time for you

Networking isn’t just time to find your new customers, it is also a way to find new mentors if you like. One who takes time in writing a note to you, remembers you when you need them are critical aspects for a great mentor. More importantly, you want someone who knows the market out there, trends and is willing to point you in the right direction.

Mentor: Someone whose hindsight can become your foresight.

Knows your needs

As you grow the mentoring needs change, you change personally and professionally – knowing someone who can properly guide you in the direction you want to go is critical. Take time clearly to understand what type of mentor you want, understand where you want to go from where you are. What are your key plans, strategies to reach there? Now a mentor has clear understanding to guide you with the intermediate milestones to reach that destination.

For many people who have come to me, I ask them where they want to be in 5 years time. The answers vary from a blank face to something like “I want to be ***** in 5 years”. Now if you have such goals, who are your idols? What has been their path? If you have a reference and you know how they got to where they are – this give you a good indicator to what steps you need to take. Isn’t this a simple strategy? There are no shortcuts to this exercise.

I can accept failure but I can’t accept not trying.

Listen and be Open to ideas

Given the enthusiasm of people, I often see people find it hard to stay calm and listen for the conversation to finish. Listen carefully and to find a mentor this is critical. Pay attention to the choice of words they use, how real they are, and what smart choices are they giving you. These are critical because you never know what ideas might spark from that 5 minutes conversation.

Do your homework, more importantly be open to receiving. If you come out as someone who knows everything the probability to find a right mentor is down the drain. Don’t fall victim of your own knowledge (or lack of it).

The happiness of your life depends on the quality of your thoughts.

Look beyond the traditional

We are in the age of internet and connected world. So don’t always derive source of inspiration from people around you. There are interesting speeches, videos from TED, books and of course the family hero’s around you from whom you can derive immense inspiration from. You don’t have to meet people to get that insights, but given an opportunity take the extra step in meeting them. The world of social networking has surely brought the divide between people a step closer. Don’t miss out on these channels of Facebooks, Twitters etc !!!

Thank in advance

People help you intentionally or unintentionally, let them know of that help. Someone mentors not for money but for the good will in seeing you successful.  The very thought that they want to help someone grow is noble – hats off.

I know there are more to the points I have discussed. Please feel free to share your experiences, I would surely love to hear them. Thanks for reading this far.

Continue reading...


CASE of recursion with SQL Server January 26th, 2012

Vinod Kumar

I have been waiting to write something on SQL Server, but never got a chance in the recent past. As part of preparation for the course for Pluralsight, we got few nice trivia’s around but missed on few of them to be included as part of the course. With TechEd India 2012 coming soon, plans to learn something interesting with SQL is always there – keep tuned in.

The maximum nesting levels with SQL Server has been with 32 levels and these have been there for a long time. While using stored procedures you can use the global variable @@NESTLEVEL to check the nested level at runtime for the nesting level. Even in the case of nested triggers this 32 limit still holds.

One exception comes with the recursion function inside SQL Server will be the use of CTE (Common table expression), but this can be limited upto 32767 value with the OPTION parameter. The documentation though says it can get into infinite loop :).

Now if you thought these were enough variations to nesting, here goes another with the CASE statement which is a limit of 10 nesting in a single query. Else you will get –

Msg 125, Level 15, State 4, Line 13
Case expressions may only be nested to level 10.

Now that is interesting and you can get it with a simple code that I used –

Declare @str Varchar(20) = ‘12345678901’
CASE WHEN @str like ‘1%’
THEN CASE WHEN @str like ‘12%’
THEN CASE WHEN @str like ‘123%’
THEN CASE WHEN @str like ‘1234%’
THEN CASE WHEN @str like ‘12345%’
THEN CASE WHEN @str like ‘123456%’
THEN CASE WHEN @str like ‘1234567%’
THEN CASE WHEN @str like ‘12345678%’
THEN CASE WHEN @str like ‘123456789%’
THEN CASE WHEN @str like ‘1234567890%’
THEN CASE WHEN @str like ‘12345678901%’

Interestingly, the new IIF command with SQL Server 2012 can also be nested. So why don’t you try what is the nesting level we can have with the IIF command?

Happy learning and sharing !!! Feel free to drop your comments. Thanks.

Continue reading...


SQL Interview Quiz Part II January 23rd, 2012

Vinod Kumar

As you must have already seen that the first set of questions were out last week, the quiz continues for this whole month and we have exciting content coming your way as part of this quiz. It has been an attempt to expand on the principles our book – “SQL Server Interview Questions and Answers” brought to the table. With close to 22 days of quiz already over, I think we are hitting a new high – participate and win the Nokia Lumia.

Day 11: Non-Clustered Index and Automatic Rebuild. Hint over Pinal’s Blog (here).

Day 12:  DACPAC and SQL Azure. Hint over Pinal’s blog (here)

Day 13: Table Variable Vs Temp Tables. Hint over Pinal’s Blog (here)

Day 14: Case of SP RECOMPILE. hint over Pinal’s Blog (here)

Day 15: Difference between CHAR, VARCHAR, NVCARCHAR and more. Hint over Pinal’s Blog (here)

Day 16: CHECKPOINT and Recovery Models. Hint over Pinal’s blog (here)

Day 17: Ways to create Constraints. Hint over Pinal’s Blog (here)

Day 18: Resource Database. Hint over Pinal’s Blog (here)

Day 19: MERGE Vs other methods. Hint over Pinal’s Blog (here)

Day 20: Access XML Datatype. Hint over Pinal’s blog (here)

If you get over the blog for the hints and then give the questions a shot – well it is a give away actually for these questions. Hope you are having fun. Cheers and keep learning something everyday !!!

Continue reading...


What do you look for at work? January 16th, 2012

Vinod Kumar

Choose a job you love, and you will never have to work a day in your life – Confucius

What does experience teach you? I think the priorities to get a job and do as you wish at work keeps changing. It is a wonderful tussle we have in our minds that it is often confused and messed up. Here are some of my thoughts around this topic. Not that everyone finds a sweet spot when it comes to a “dream job”. Though a dream job is always a moving target once we reach a particular state, it is important to have some clear expectations within us when it comes to seeking a prospective job too.

Find below some of my perspectives on what I personally think can make a big difference when it comes to life at work. Do these sync with the perspectives you have?

  1. Chance to use skills to grow – This is critical aspect because I have seen some good friends of mine, just switch once they get stagnant in a single place with nothing to grow. This I thought was worth a mention.
  2. Chance to do something worthwhile – Second thing that comes to mind are a constant struggle to do something new every time. Yes, routine work is essential but people keep looking out for some new technologies to get hands-on and explore and quench their technology hunger.
  3. Feeling respected – As much as recognition is the much needed energy at work, getting that respect from colleagues is very essential for a healthy environment.
  4. Friendly environment – I have seen many look at what is the organizational state. Rumors, partiality, exploration, flexibility and many more attributes almost make or steal a potential workforce. I can’t emphasize more on this concept.

I remember a conversation I was having with a family friend and a senior executive in the Financial industry around the concept of generation divide when it comes to work forces. Interestingly, this internet based era when tries to sync with the pen/newspaper/NEWS era generation it just makes it even more interesting. Are the rewards, returns and their needs same or different?

Pleasure in the job puts perfection in the work – Aristotle

I think the one big difference that younger workers have is the desire for instant gratification and reward. I know some of the older, want the feeling of respect and a sense that they are accepted by their younger peers and less about the instant gratification. Many older workers look at doing extra as just part of the job getting done while the younger worker wants to be rewarded for doing the extra. These differences in thinking and attitude is what sometimes makes managers and HR’s split their hair :). Which category are you – remember recognition is different from rewards?

We pretend to work because they pretend to pay us :)


Have a positive attitude towards life at work. Don’t try to expect too much and get disappointed eventually. There is more to life and you can make the change to go where you want to. So stop cribbing and make immense with what skills you have.

I would love to hear from your experiences too. May be I am myopic and missing some of the obvious.

Continue reading...


SQL Interview Quiz Part I January 13th, 2012

Vinod Kumar

I have been helping my co-author of book – “SQL Server Interview Questions and Answers” – Pinal Dave over his blog for a unique contest. And the SQL Quiz has been up and running for the past 13 days and we are excited to see some great response from the folks out there. Keep those flowing :). It is not late yet, let me recap what all to watch out for the first 10 Quizzes till date. Exciting prizes awaits, so don’t miss the opportunity.

Day 1: It is about ANSI-Isolation Levels Question. Hint over Pinal’s Blog (here)

Day 2: Quiz around various kinds of Triggers. Hint over Pinal’s Blog (here)

Day 3: Identity and behaviors inside SQL Server. Hint over Pinal’s Blog (here)

Day 4: The tale of using WHERE clause inside SQL Server. Hint over Pinal’s Blog (here)

Day 5: Locking and Blocking with SQL Server. Hint over Pinal’s Blog (here)

Day 6: Collation and Collation Sensitivity with SQL. Hint over Pinal’s Blog (here)

Day 7: Restrictions with Indexed Views. Hint over Pinal’s Blog (here)

Day 8: RANKING functions with SQL Server. Hints over Pinal’s Blog (here)

Day 9: Blocking and Locking with SQL Server Quiz. Hint over Pinal’s Blog (here)

Day 10: OUTPUT Clause with SQL Server DML statements Quiz. Hint over Pinal’s Blog (here)

Each of the quiz questions are quite easy to solve if you get a chance to see the hints we have provided. In fact, they are giveaways once you read the hint. Seriously, believe me. So much of fun to pick some of these fine prints when working with SQL Server.

Lesser known fact – “SQL Server Interview Questions and Answers” book is over Kindle. These questions are surely discussed over our book, so we think it is making us think more and expand on the basics we discussed over the book.

Feel free to take part in the quiz folks and pass me your feedbacks.

Continue reading...