Forum Replies Created

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

  • Reply To: EXCEPT

    Jason- wrote:

    *** sorry for the spoilers; but my comment didn't make sense to me without them ***

    I debated with myself between "Zero records" and the more comprehensive "Returns distinct rows...

  • Reply To: EXCEPT

    Rune Bivrin wrote:

    Carlo Romagnano wrote:

    Of course the isolation level of the database should be as in the image

    1

    Of course! That's obviously clear from the questionđŸ˜‹

    The question is about the...

  • Reply To: EXCEPT

    Of course the isolation level of the database should be as in the image

    1

  • Reply To: EXCEPT

    Palani K wrote:

    I ran the query and see zero rows only, please verify your answer.

    If the query returns no row, it means that there are not uncommitted data (inserted or modified).

  • Reply To: EXCEPT

    For debug, I used this query to return all rows inserted or changed in all open transaction.

    How to reproduce the scenario:

    Start a transaction in one session, insert or modify data...

  • Reply To: Removing Text From All Rows

    If you assume that the string always starts with '\1\' (as the original post) and you do not know then length of text then you can use STUFF instead of...

  • Reply To: Removing Text From All Rows

    WITH ctePC
    AS ( SELECT expression
    FROM
    ( VALUES
    ...
  • Reply To: Implicit conversion from datetime to datetime2

    Good catch!

    Thanks.

  • Reply To: Row and Page Compression Facts

    From your link:

    Compression can allow more rows to be stored on a page, but does not change the maximum row size of a table or index.

    So, the "Compression can allow...

  • Reply To: Choosing Rows or Range

    Please, post an example with RANGE!

    I tried this one, so the right answer is PARTITION BY:

    SELECT SUM(object_id)OVER()

    ,SUM(object_id)OVER(PARTITION BY NULL)

    FROM sys.objects

    WHERE object_id < 100

  • Reply To: Create a Tally Function (fnTally)

    I use this function with recursion and @top of 1000000 is enough for me, but I don't n know if it performs better:

    -- by Carlo.Romagnano

    CREATE FUNCTION dbo.fn_tally(@top INT)

    RETURNS TABLE

    AS

    RETURN WITH...

  • Reply To: Sorting in R

    Explanation doesn't match with the "pseudo correct" answer.

    From documentation:

    The "radix" method generally outperforms the other methods, especially for character vectors and small integers. Compared to quick sort, it is slightly...

  • Reply To: More Which in R

    Little typo: newletters vs new_letters

    newletters<- c("q","w", "e", "r", "t", "y", "u", "i", "o", "p", "q", "w", "e" )

    > which (new_letters=="q")

  • Reply To: How Many Rows Inserted?

    "In this code, the SET IMPLICIT TRANSACTIONS ON sets a @@trancount of 1. I am not sure why this occurs, but it means that after the COMMIT, there is still...

  • Reply To: Parameters in RAISERROR

    -- correct

    declare @d tinyint = NULL

    RAISERROR(' %s is the current value', 1, 0, @d)

     

    -- incorrect

    declare @d tinyint = 1

    RAISERROR(' %s is the current value', 1, 0, @d)

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