Forum Replies Created

Viewing 15 posts - 3,166 through 3,180 (of 3,347 total)

  • RE: ALL

    Nice question, Steve.

    Too bad you didn't use the same case in the query and the list of values, as this might (*) result in different answers being returned when tested...

  • RE: Sort Order - Include Null al last

    knechod (6/23/2008)


    Actually, I am still having difficulty understanding the distinction. According to the BOL in the COALESCE topic:

    ISNULL and COALESCE though equivalent, can behave differently. An expression involving...

  • RE: Sort Order - Include Null al last

    Sorry - you were wrong

    I was already afraid of that, seeing how the text of the question and the sample output presented contradict each other.

    Really a shame. It is a...

  • RE: ANY

    majorbloodnock (6/20/2008)


    Of course, strictly speaking the question will only be correct for case insensitive collations, since the values in the question are "value1, value2, value3 and value4", yet the comparison...

  • RE: Cursors

    As others already mentioned, sp_decribe_cursor is a typo. A so obvious typo that I didn't even catch it until I saw it being mentioned in the comments here. I can't...

  • RE: Text Column Updates

    I knew I would be wrong when I submitted my answer. I knew that this question would be wrong. I knew someone would have read only half the deprecation note...

  • RE: A Hex on Your Database

    Brad (6/6/2008)


    Stored procedures have to be properly parameterized too. I've seen garbage like this way too many times:

    string sql = "EXEC my_stored_proc " + param1;

    Which still leaves you wide...

  • RE: A Hex on Your Database

    Mike C (6/6/2008)


    Stored procedures have to be properly parameterized too.

    You posted this while I was composing my similar reply 🙂

    Great minds think alike! 😀

  • RE: A Hex on Your Database

    If the web page does not use stored procedures, but instead uses dynamic SQL,

    Maybe this is also a good place to point out that stored procedures and dynamic SQL are...

  • RE: A Hex on Your Database

    Mike C (6/5/2008)


    Maybe I'm missing something here. This statement, executed as dynamic SQL in SQL Server:

    account=1;declare @a varchar(1000);set @a=cast(0x73656C656374206E616D652066726F6D207379732E6461746162617365733B as varchar(1000));exec(@a)

    Is supposed to generate something other than an error...

  • RE: A Hex on Your Database

    Steve (hope you're reading),

    The code snippets are completely unreadable on my computer (Windows XP, running Internet Explorer 7. Scrrenshot is below:

    (Since I found no way to attach an image, I...

  • RE: The "Numbers" or "Tally" Table: What it is and how it replaces a loop.

    jcrawf02 (5/22/2008)


    (...) How does SQL know to piece this back together in its entirety in one SELECT, without having to go through a WHILE loop OR join to a Tally...

  • RE: The "Numbers" or "Tally" Table: What it is and how it replaces a loop.

    ALZDBA (5/9/2008)


    Hugo Kornelis (5/8/2008)


    .

    Correct me if I'm wrong but IMO if result changes because of a changed index, your query symantics do not reflect what you want 100%!

    Hi ALZDBA,

    Exactly. And...

  • RE: The "Numbers" or "Tally" Table: What it is and how it replaces a loop.

    Jeff Moden (5/8/2008)


    You wrote the following in your blog...

    SQL Server will happily update the same row over and over again if it matches more than one row in the joined...

  • RE: The "Numbers" or "Tally" Table: What it is and how it replaces a loop.

    Jeff Moden (5/8/2008)


    Heh... I really appreciate the feedback, Hugo. Hmmmm... ease of coding... you're saying that writing a WHILE loop is easier to write than a simple cross-join? ...

Viewing 15 posts - 3,166 through 3,180 (of 3,347 total)