SQL JOINS

  • Comments posted to this topic are about the item SQL JOINS

  • Good question πŸ™‚

    +1

    _______________________________________________________________
    To get quick answer follow this link:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

  • Very easy!

  • Good start of week.

    Thanks for question.

    πŸ™‚

    Thanks
    Vinay Kumar
    -----------------------------------------------------------------
    Keep Learning - Keep Growing !!!

  • Calling a column ID and then putting duplicate values in it is just evil. No raise for the developer who wrote this, and a warning that (s)he'll be fired if it happens again.

    And not noticing it while working out the result of a QotD in my head is just stupid *facepalm*. No raise for me either.

    I do not really like what currently appears to be in fashion here, to write what appears to be a question about a SQL feature, but that actually tests our ability to detect sneaky issues that are hidden in the question and/or code. Yes, I know that being made responsible for existing code often is the same. I don't mind such questions every now and then. But I have this feeling (not based on any actual counting) that there are a bit too many of them lately.


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/

  • nice question... very simple....

    Manik
    You cannot get to the top by sitting on your bottom.

  • This was removed by the editor as SPAM

  • with QOTD I have learned to straight away look for the keyword identity when I see column name ID. πŸ™‚

    ---------------------------------------------------------------------

  • Hugo Kornelis (4/15/2013)


    Calling a column ID and then putting duplicate values in it is just evil. No raise for the developer who wrote this, and a warning that (s)he'll be fired if it happens again.

    And not noticing it while working out the result of a QotD in my head is just stupid *facepalm*. No raise for me either.

    Nor for me. I feel quite an idiot for falling for it. :blush:

    I do not really like what currently appears to be in fashion here, to write what appears to be a question about a SQL feature, but that actually tests our ability to detect sneaky issues that are hidden in the question and/or code. Yes, I know that being made responsible for existing code often is the same. I don't mind such questions every now and then. But I have this feeling (not based on any actual counting) that there are a bit too many of them lately.

    Trick questions are a part of life. If there are too many we could try shooting the people who write them if both (a) we have any bullets left after we finish the politicians, bankers, economists, and lawyers and (b) we manage to stay out of gaol after dealing with the P,B, E and L. :hehe:

    Tom

  • L' Eomot InversΓ© (4/15/2013)


    Trick questions are a part of life. If there are too many we could try shooting the people who write them if both (a) we have any bullets left after we finish the politicians, bankers, economists, and lawyers and (b) we manage to stay out of gaol after dealing with the P,B, E and L. :hehe:

    Tom, that is the quote of the year.

  • An interesting question. The duplicate ID's was certainly a nasty distraction. I managed to notice the ID issue but wonder what this question was really trying to test/teach. I think it would have been a better question if the logic would actually test the knowledge of the different join types.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • Interesting, good question.

  • Yes, very easy indeed

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Sean Lange (4/15/2013)


    An interesting question. The duplicate ID's was certainly a nasty distraction. I managed to notice the ID issue but wonder what this question was really trying to test/teach. I think it would have been a better question if the logic would actually test the knowledge of the different join types.

    After a while, it feels natural to approach all unexpected results as a trick question, especially when looking at someone else's code. "Will all of these rows actually insert? Is the data clean? Do these links actually do what I think they're intended to do? Is there a typo or bad reference because someone named two fields the same in different tables with different data? Are the parentheses and quotes all in the right places? Did IntelliSense replace "TOP" with "Top_level_group" again?"

    Of course, there may be occasional times where I give myself such fun code hunts, but I'll claim that's rare.


    Puto me cogitare, ergo puto me esse.
    I think that I think, therefore I think that I am.

  • Thanks for an easy one, Yogesh!

Viewing 15 posts - 1 through 15 (of 24 total)

You must be logged in to reply to this topic. Login to reply