More wildcard searches

  • radek.hruby (10/28/2015)


    The author possibly overlooked that in the first sentence the word "coffee" is twice.

    +1

    Forgot the "coffee " in "coffee bean". Obviously the "coffee." didn't meet the selection criteria. 😀

  • Should be five. I ran the query and it returned 5 rows. Hmmm... 😉

  • There are clearly 5 rows in the create table script, if "all" the rows are returned, then all = 5.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • All rows are returned.

    Probably author intended to put a trap on line 1 with 'coffee.' but there is also a ' coffee ' at the beginning.

    I suppose the score and result must awarded considering the correct result.

  • The other potential "trap" is that depending on the collation settings (which were not mentioned) the LIKE operator can be case sensitive so the sentences starting with "Coffee" wouldn't match; the default for SQL Server will match them though.

  • Am I missing something here?

    All rows are returned, but that is five rows not four.

    Off to get my coffee.......

  • Oops!

  • How it is 4? it will return 5 (all rows which are inserted) and 5 should be the answer

  • This was removed by the editor as SPAM

  • Stewart "Arturius" Campbell (10/28/2015)


    My first thought upon seeing the result was "Hmmm, maybe my first 2 cups of coffe have not kicked into gear yet, maybe i need another".

    however, even after the third cup, the answer still does not make sense.

    The idea behind the question was good, just a glitch with execution...

    Only three?! You need five! Or is it four....?

  • It is you? who is wrong.

    I tried this example and received FIVE records:-P

  • Actually on my system the answer is an error because the table would be created in my personal schema but then the insert and select are from dbo. Converting everything to a temporary table, the select returns 5 rows.

  • Hey Folks, It happens on QotD. Don't worry Steve will fix it 😉

    As per the question, good basic question thanks for sharing. And Steve you will be be very happy to see the 84% have answered 5 😀

    Cheers!!!

  • I'm in the 5 camp as well. Perhaps someone could nudge the question setter to double check his question and answer! 🙂

  • david.dilworth (10/28/2015)


    I'm in the 5 camp as well. Perhaps someone could nudge the question setter to double check his question and answer! 🙂

    It happens every now and again - points are usually awarded back in the case of something being totally incorrect so you won't miss out (If you're worried about them).

    Did make me think though - thought I'd missed something sneaky at first so read it a lot more carefully the second time round 🙂

Viewing 15 posts - 16 through 30 (of 85 total)

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