Forum Replies Created

Viewing 9 posts - 1 through 10 (of 10 total)

  • Reply To: The Rank Window

    I also tried it with:

    total [bigint] NULL

    Results are the same 10 records

    To get the 8 records, the select statement should look like this:

    SELECT

    st.SalesPersonID

    , st.total

    , RANK () OVER (PARTITION BY st.SalesPersonID

    ORDER...

  • Reply To: The Rank Window

    After correcting the script:

    USE TEST

    CREATE TABLE [dbo].[SalesTracking]
    (
    [SalesDate] [datetime] NULL,
    [SalesPersonID] [int] NULL,
    [CustomerID] [int] NOT NULL,
    [PONumber] [varchar] (80) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [paid] [bit] NULL,
    total [money] NULL
    ) ON [PRIMARY]
    GO
    CREATE CLUSTERED INDEX...
  • Reply To: The Reindeer Count

    Delving into a bit of "Rudolph the Red-Nosed Reindeer" trivia:

    While the song does list all Nine of the reindeer, it does not specifically say that Santa used all of them...

  • Reply To: The Update Lock

    Am I missing something here?

    If I am reading this correctly, Microsoft is saying that an Update lock is converted to an Exclusive lock.

    "Only one transaction can obtain an update (U)...

  • Reply To: The Order of Operations

    The implied multiplication comes into play because of the negative sign.

    Think about Algebra

    -100/-100*x can be written as -100/-100x

    Algebra would solve this problem by multiplying the -100 and x first.

    In our...

  • Reply To: The Order of Operations

    SQL reads from left to right

    Example 16/4/4 is interpreted as (16/4)/4 = 1  instead of 16/(4/4)=16

    SQL is using implied multiplication.

    Multiplication is interpreted as having higher precedence than division, so that...

  • Reply To: SELECT and Locking

    From

    https://docs.microsoft.com/en-us/sql/t-sql/statements/set-transaction-isolation-level-transact-sql?view=sql-server-ver15

    READ COMMITTED

    Specifies that statements cannot read data that has been modified but not committed by other transactions. This prevents dirty reads. Data can be changed by other transactions between individual...

  • RE: Christmas 2017 - Part 3

    gvoshol 73146 - Wednesday, December 27, 2017 8:02 AM

    But if you sort by locale DESCENDING as in the possible answers, you will...

  • RE: Christmas 2017 - Part 3

    The correct answer is Movie
    I had to add a Genre to the last record set and correct the syntax for the movie title [It's a Wonderful Life] to get...

Viewing 9 posts - 1 through 10 (of 10 total)