Wildcard

  • Comments posted to this topic are about the item Wildcard

  • Never seen this wildcard till now, thanks for the tip, was worth getting it wrong

    Glen Parker 🙂

  • I too had to guess. Got it right only because I new the others were wrong. Never saw this wild card before, and look forward to using it.

    Thanks for the QOD

    Steve Jimmo
    Sr DBA
    “If we ever forget that we are One Nation Under God, then we will be a Nation gone under." - Ronald Reagan

  • That's what I get for answering before having my coffee. :doze:

    I picked '%im' because of course % is a wildcard. But it will return more than just Kim or Tim.

    Nice question.

    Dave

  • DOH missed Jim at the top...

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

  • Thanks for the question! I did not know you could do that (but apparently I am in the minority). :hehe:

  • Good one. Always used '%' as wild card.

    SQL DBA.

  • That's really cool to know.

    Thanks for a good QOD.

    Tom Garth
    Vertical Solutions[/url]

    "There are three kinds of men. The one that learns by reading. The few who learn by observation. The rest of them have to pee on the electric fence for themselves." -- Will Rogers
  • John McC (1/26/2010)


    DOH missed Jim at the top...

    I nearly did the same thing - had to reread the list of names. If you see Jim at the top, I think the question becomes a lot easier.

    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

  • Thanks for the question and the reminder on this type of pattern matching.

    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

  • Removed

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • Gr8 QotD, Thanks...I got it correct...but it was just a calculated guess...as other options were incorrect...

    look fwd to use this wildcard...

  • Good Question ... had to revise all wildcard characters. 😀



    [font="System"]Bhavesh Patel[/font]

    http://bhaveshgpatel.wordpress.com/
  • To be strict, the source data was a red herring. A where clause shouldn't be based on the data you have, but the data you want.

    In this case, for example, it doesn't matter that "Jim" exists in the source data (or "Tim" or "Kim" or "Bim" for that matter). What matters is that you want to retrieve only rows with "Tim" or "Kim".

    If you used "Like '%im'", and "Jim" wasn't in the source data, your query would work. Once. But it would break as soon as someone added any other name like '%im'. If you get in the habit of using shortcuts rather than framing your query properly, you'll be rewriting queries more and more often.

    Trust me, I know.

  • Its good to learn something like this 🙂

    Thanks

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

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