Forum Replies Created

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

  • RE: Finding the database

    it also makes no attempt to validate the string you pass in, so
    SELECT PARSENAME('x.y.z', 3)
    will always return 'x'
    ie it's a simple string-parsing method.

    Surely...

  • RE: Thanksgiving Trivia

    also not so easy for anyone who answers based on the actual question 😉

  • RE: Finding the Percentage

    Personally I would cast everything in sight to a decimal - implicit conversions are a complete pain, explicit casting will guarantee the correct result.

  • RE: QUOTENAME() Types

    I don't think that's the right answer. It always returns nvarchar - but if the input is invalid then the nvarchar value is NULL
    If you run 
    select...

  • RE: Creating Strings with Replicate

    Got this right as I was hit by it a while back. Still feels like a bug to me, but Microsoft say not so it can't be 😉
     You have...

  • RE: NULL Tests

    Never mind the duplicate answers. Under what circumstances would it be a good idea to have ANSI_NULLS set to OFF?

  • RE: Starting a CTE

    Steve Jones - SSC Editor - Thursday, July 12, 2018 7:58 AM

    lmalatesta - Thursday, July 12, 2018...

  • RE: Assignments

    morlindk - Tuesday, July 3, 2018 3:00 AM

    So simple. Amazing 32% can get it wrong!

    Not that amazing when you consider that the...

  • RE: TRY_CONVERT

    richardmgreen1 - Friday, June 15, 2018 2:24 AM

    I'm not sure why it doesn't work (although the value won't convert directly using cast),...

  • RE: TRY to CAST

    gvoshol 73146 - Tuesday, April 10, 2018 6:47 AM

    That's the exact same reason the original query in the question returns...

  • RE: TRY to CAST

    Never used the function, but didn't need to know anything about it - there's no where clause, no distinct, so must return 5 rows or give an error, and given...

  • RE: What's going on?

    If that one is correct, then the first option is also correct 😉

    The short lesson for all of these context_info questions is surely not to rely on any...

  • RE: FORMAT that string

    Revenant - Thursday, March 1, 2018 9:06 AM

    Jedak - Thursday, March 1, 2018 7:52 AM

  • RE: Context_info() data

    Yup, should definitely be Binary Data, the fact that some other data types get implicitly converted is irrelevant.

  • RE: New Rules

    Bit of a strange question, teaching me about something I wasn't aware of but which I won't ever use as it's been deprecated!

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