T-SQL SQL 2008

  • I got it right, but I had to research BOL to figure out some of the operators. Guess I should have started at the end, would have saved a few brain cells.

    Excellent question, learned something new in SQL Server 2008.

  • Good question.

    Also, thanks for the added explanation, Hugo. I knew what everything was except for the Exclusive OR (^).:-)

    Thanks.

    --

    Kevin C.

  • Lynn Pettis (6/21/2010)


    I got it right, but I had to research BOL to figure out some of the operators.

    Sounds like I'm in the minority in having a background in C programming :-).

    Re the QotD image not being visible in email: that (along with what IMHO is worse visibility) is why I don't like this trend towards images for QotDs. Given the comments of others in previous discussions on the subject, here too I may be in the minority. I'll deal with whatever presentation method is utilized by SSC, but for now, my vote goes to the text method.

  • Nice question, it made me think a more than usual, thanks!

  • Yes, it would be nice if the explanation explained what the bitwise compound assignment operators were especially since those were the real challenge of the question. Even the link provided (http://technet.microsoft.com/en-us/library/cc721270.aspx) does not mention them. . .

  • I was sure about the %(Modulo) and found the answer quit easily.

    i learned about Bitwise Exclusive OR (^).thanks for a nice Question.

  • Bizarrely enough, the modulo operator was the one I had to go to BOL to check up on--I don't think I've ever used it in SQL before! Bitwise operators I've encountered many times before in my C programming career (long time ago now).

  • nice question.... thanks 🙂

  • Picture didn't appear for me either.

    -------------------------------------------------------------------------
    Normal chaos will be resumed as soon as possible. :crazy:

  • Can someone post the question? After loading all the email images in Outlook, the question image will not display for me. Thanks.

  • jschmidt 17654 (6/22/2010)


    Can someone post the question? After loading all the email images in Outlook, the question image will not display for me. Thanks.

    Scroll up, hit the link at the top of the first post and go to the page straight on the web rather than outlook, the picture will appear there.

  • Toreador (6/21/2010)


    I agree with Hugo - I knew the modulus answer, but had no idea what the others were. So got it correct as only one option had the right value for @e 🙂

    I didn't remember straight away whether the | operator was bitwise OR (as in some awful programming languages) or bitwise NAND (traditional use, going back to Scheffer's 1913 paper) but like you I noticed that it didn't matter as % determined the answer on its own. And then it was easy to see that 1|1 = 1 and 1|0 = 1 and 0|0 = 0 so | must be OR.

    I wonder why SQL uses the Scheffer Stroke for OR when it's traditional use in maths, logic, CS, and hardware design is for NAND; I'll bet it's inherited this use from some awful low level programming language.

    Tom

  • ^ (bitwise exclusive or) took some time to find out the correct answer

    good question thanks.

Viewing 13 posts - 16 through 27 (of 27 total)

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