SQLAuthority News – Interview with SQL Server MVP Madhivanan – A Real Problem Solver

Madhivanan (SQL Server MVP) is a real community hero. He is known for his two skills – 1) Help Community and 2) Help Community. I have met him many times and every time I feel if anybody in online world needs help Madhivanan does his best to reach them out and solve problem. His name is not new if you are reading this blog or have ever asked a question in any online SQL forum. He is always there to help.

When Madhivanan has time he even helps people on this blog as well. He spends his valuable time to help community only. He recently crossed over 1000 helpful comments on this blog. On that occasion, I have interviewed him to find out if he has any life outside SQL.

Q 1. Tell us something about your self.
I am Madhivanan ,an MSc computer Science graduate from Chennai, India and working as a Lead Analyst-Project at Ellaar Infotek Solutions Private Limited. I am basically a developer started with Visual Basic 6.0, SQL Server 2000 and Crystal Report 8. As years go on I started working more on writing queries in SQL Server in most of the projects developed in my company. I have some good level of knowledge in ORACLE, MySQL and PostgreSQL as well. Now I am leading a project developed in Windows Azure.

Q 2. What motivates you to help people on community and forums.

When I got some errors during the application development in my early days of my career, I got good solutions from online forums and weblogs. So I decided to help others if possible. When I visit forums I help people  if I know the answer to the questions. I am one of the leading posters at www.sqlteam.com and also a moderator at www.sql-server-performance.com. I also take part in Visual Basic and Crystal Reports forums.
I have been SQL Server MVP since 2007.

Q 3. Your personal life is not much known. Tell us something about your personal life.

I am happily married person. My wife is a B.Pharm graduate. I have a son who is now 18 months old.

Q 4. Where can we read further for your community activity.

I have a blog at http://beyondrelational.com/blogs/madhivanan where you can find most of my T-sql stuffs

Q 5. When not working with SQL what do you do?

When not working with SQL, I spend time playing with my son, reading some magazines and watching TV.

Madhivanan for your work and help to community, a true salute to you. Hats off my friend.

Reference: Pinal Dave (http://blog.SQLAuthority.com)

About these ads

34 thoughts on “SQLAuthority News – Interview with SQL Server MVP Madhivanan – A Real Problem Solver

  1. @ Madhivanan.

    Dude, you are one SQL Crazy guy.

    Is it a requirement that one has to to be so Crazy/Mad about technology to become MVP, I believe Yes…

    You are awesome.

    Keep it going. Time welll spent…

    ~IM.

  2. Hai Pinal Dave sir,

    I am also in chennai.. But we are not know about this person knowledge and activities. but u only watch and know the speciality of madhivanan..

    i think and feel U only my SQL Guru.. Also, now i got other one..

    I am a Junior Software Developer in Chennai..

  3. Hats off guys. wonderful job

    I have been to this site many times got many useful informations but never mind to know who wrote it.

    But now on I will know the author as well.

    Thanx
    Karthik.P

  4. hi
    i have four table and I also has output can you help me how to get it that.
    create table person
    (PID int,
    Name Varchar(20))
    insert into person values (1,’x’)
    select * from person
    create table maritalStatus
    (PID int,
    Status varchar(20),
    Date Date)
    insert into maritalStatus values(1,’s’,’06/01/2010′)
    insert into maritalStatus values(1,’m’,’06/20/2010′)

    create table JobStatus
    (PID int,
    Status varchar(20),
    Date Date)
    insert into JobStatus values(1,’U’,’06/01/2010′),(2,’E’,’06/10/2010′),(3,’U’,’07/01/2010′)

    create table Fstatus
    (PID int,
    Status varchar(20),
    Date Date)
    insert into Fstatus values (1,’F1′,’06/01/2010′),(1,’F2′,’06/10/2010′),(1,’F3′,’06/22/2010′)

    output is

    PID Date MaterialStatus Jobstatus Fstatus
    1 06/01/2010 S U F1
    1 06/10/2010 S E F2
    1 06/20/2010 M E F2
    1 06/22/2010 M E F3
    1 07/01/2010 M U F3

    Please help me out how to do this query

  5. Pingback: SQLAuthority News – A Monthly Round Up of SQLAuthority Blog Posts Journey to SQL Authority with Pinal Dave

  6. @Brain

    Actually This is the task given to us. it does not mention any Rules in that. but he only want output like this.

    PID Date MaterialStatus Jobstatus Fstatus
    1 06/01/2010 S U F1
    1 06/10/2010 S E F2
    1 06/20/2010 M E F2
    1 06/22/2010 M E F3
    1 07/01/2010 M U F3

  7. @Madhivanan

    Do You have solution for this query.

    create table person
    (PID int,
    Name Varchar(20))
    insert into person values (1,’x’)
    select * from person
    create table maritalStatus
    (PID int,
    Status varchar(20),
    Date Date)
    insert into maritalStatus values(1,’s’,’06/01/2010′)
    insert into maritalStatus values(1,’m’,’06/20/2010′)

    create table JobStatus
    (PID int,
    Status varchar(20),
    Date Date)
    insert into JobStatus values(1,’U’,’06/01/2010′),(2,’E’,’06/10/2010′),(3,’U’,’07/01/2010′)

    create table Fstatus
    (PID int,
    Status varchar(20),
    Date Date)
    insert into Fstatus values (1,’F1′,’06/01/2010′),(1,’F2′,’06/10/2010′),(1,’F3′,’06/22/2010′)

    output is

    PID Date MaterialStatus Jobstatus Fstatus
    1 06/01/2010 S U F1
    1 06/10/2010 S E F2
    1 06/20/2010 M E F2
    1 06/22/2010 M E F3
    1 07/01/2010 M U F3

    Please help me out how to do this query

    • You haven’t given any rules.
      This is what I come up with

      select t1.*,m.status as mstatus,j.status as jstatus,f.status as fstatus from
      (
      select pid,date from person as p
      cross join
      (
      select date from maritalStatus
      union
      select date from jobstatus
      union
      select date from fstatus
      ) as t
      ) as t1
      left join maritalStatus as m on t1.pid=m.pid and t1.date=m.date
      left join jobstatus as j on t1.pid=j.pid and t1.date=j.date
      left join fstatus as f on t1.pid=f.pid and t1.date=f.date

  8. Thanks for Your Reply @Madhivanan

    But Actually in Output It give me the Null values.
    IN each column there should be value in it.

  9. Hello @Madhivanan I had one interview in that they ask me difficult question can you please answer that question.

    1). How do you write a query in MySql in order to get the result that a full join generates.

    2). Without using FullJoin how will you get the result that a full join generates.

    3). What is an execution plan and how do you read that? (Asked to explain what an index seek, index scan etc in detail with an example)

    4).Steps followed to do performance tuning.

    5).How do you make use of a Union All in place of Union in performance tuning. (Asked to explain with an example)

    6). Requirement: Every one hour data is transferred from OLTP to OLAP in a particular company. Now in a database there is data for the past 30 days. We need to create a package in SSIS
    where that will find the highest volume of each day and at what time that particular slot was generated.

    I told him, I will be creating a Stored Proc and will be calling the stored proc. He said, there is no need for you to create a store proc.

    Then he asked the same requirement and to write a code to TSQL. I told with CTE and rank function, store proc etc.

    He was not satisfied. He said we can get the result in one single statement.

    Do anyone of you know how to do it in TSQL as well as in SSIS?

    7).when an SSAS package is created by default a dimension is created, What that is

    8).How do you test the performance of a package once the package is deployed

    9).Reporting services lifecycle

    10).Architecture of SSRS

    11).What a star schema and snow flake schema? Which is better and why?

    12). If star schema is better why people go in for snow flake schema. Again asked to explain with a real time example

    13).Deadlocks and how do u get rid off them

    14).How do you do error handling in SSIS

    15). How do you handle duplicates in SSIS

    16).Does store procedure have permission encapsulation?

    This are the interview so Guys go through it. and if any other person knows the answer please post it and share with others.

  10. Pingback: SQLAuthority News – Last 2 Day to Win MSDN Subscription – Total 2 to Win Journey to SQL Authority with Pinal Dave

  11. An inspiration to us all, your giving has uplifted many & continues to drive us forward to find better solutions and discover new ways to provide a better service to users, thank you!

  12. CREATE PROCEDURE TestSproc2
    @size int = 20,
    @current int ,
    @columns varchar(1000) = ‘*’,
    @tableName varchar(100),
    @condition varchar(1000) = ”,
    @ascColumn varchar(100) = ”,
    @bitOrderType bit = 0,
    @pkColumn varchar(50) = ”

    AS
    DECLARE @strTemp varchar(300)
    DECLARE @strSql varchar(5000)
    DECLARE @strOrderType varchar(1000)

    BEGIN
    IF @bitOrderType = 1
    BEGIN
    SET @strOrderType = ‘ ORDER BY ‘+@ascColumn+’ DESC’
    SET @strTemp = ‘(SELECT max’
    END

    IF @current = 1
    BEGIN
    IF @condition != ”
    SET @strSql = ‘SELECT TOP ‘+STR(@size)+’ ‘+@columns+’ FROM ‘+@tableName+
    ‘ WHERE ‘+@condition+@strOrderType
    ELSE
    SET @strSql = ‘SELECT TOP ‘+STR(@size)+’ ‘+@columns+’ FROM ‘+@tableName+@strOrderType
    END

    ELSE
    BEGIN
    IF @condition !=”
    SET @strSql = ‘SELECT TOP ‘+STR(@size)+’ ‘+@columns+’ FROM ‘+@tableName+
    ‘ WHERE ‘+@condition+’ AND ‘+@pkColumn+@strTemp+'(‘+@pkColumn+’)’+’ FROM (SELECT TOP ‘+STR((@current-1)*@size)+
    ‘ ‘+@pkColumn+’ FROM ‘+@tableName+ ‘where’+@condition+@strOrderType+’) AS TabTemp)’+@strOrderType
    ELSE
    SET @strSql = ‘SELECT TOP ‘+STR(@size)+’ ‘+@columns+’ FROM ‘+@tableName+
    ‘ WHERE ‘+@pkColumn+@strTemp+'(‘+@pkColumn+’)’+’ FROM (SELECT TOP ‘+STR((@current-1)*@size)+’ ‘+@pkColumn+
    ‘ FROM ‘+@tableName+@strOrderType+’) AS TabTemp)’+@strOrderType
    END
    END
    EXEC (@strSql)

    can you please explain me what does this store proc do??

  13. The database contains a simplified healthcare claim data model consisting of three tables:
    1. MedicalClaimHeader: Contains 1 record (claim) per medical encounter
    2. MedicalProcedure: Contains 0 or more records for each procedure performed during a medical encounter
    3. MedicalDiagnosis: Contains 0 or more records for each diagnosis made during a medial encounter.
    The MedicalClaimheader table is related to the MedicalProcedure and MedicalDiagnosis tables by the ClaimNumber field.
    Write a T-SQL query that finds every claim where a procedure 8694 was performed, without a diagnosis of 4019.

    can any one write this query..

  14. Really nice to see an article on Madhi here. He’s one among the few who really motivated me when I started participating in SQLTeam and I really owe a lot to him. Hats off my friend!

  15. Hi,
    Q1:
    Emp_id Name Reporting
    1 Suresh 1
    2 Ramesh 2
    3 kumar 3
    4 rajesh 3
    5 raju 3

    how to disply empid name find out the reporting person

    Q2:
    emp_id month salary
    1 jan 15000
    1 feb 30000
    1 mar 20000
    2 jan 40000
    2 feb 50000
    2 mar 60000
    3 jan 70000
    3 Feb 80000
    3 Mar 90000

    disply quarter wise and grid

    output:
    Emp_id Jan Feb Mar
    1 15000 30000 20000
    2 40000 50000 60000
    3 70000 80000 90000

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s