Forum Replies Created

Viewing 15 posts - 31 through 45 (of 46 total)

  • RE: Sub Query

    I figured what the question was going for but I agree the correct answer should have been D. I saw the problem as the specific wording of RESULT. The whole...

  • RE: Fun with OVER

    Fair point that C wouldn't *guarantee* those exact results if anything about this example changed (e.g. change the order of data entry).

    I was focusing on the framing method and...

  • RE: Fun with OVER

    Raghavendra Mudugal (6/26/2014)


    Also, can any explain... in query A, when Jean has 1 and Anita and Mary has 3 where did the 2 go?

    In question A the default framing is...

  • RE: Fun with OVER

    pmadhavapeddi22 (6/26/2014)


    Though QOTD mentions to use sql2012, I had to use only 2008 R2 and i tried with row_number.

    option A and B returned the same result in 2008 R2

    but for...

  • RE: Fun with OVER

    It took me a while to get my head around the difference between the windowing (PARTITION BY) and framing within the window (ORDER BY). The critical aspect of this question...

  • RE: CTE DML

    No, that GO was just to ensure that the table creation and loading was complete before attempting the query. I prefer to keep my DDL, data loading and queries in...

  • RE: CTE DML

    In my experience the most common use for CTE is to replace a subselect and use the CTE in a join. The advantage is that a CTE typically only runs...

  • RE: CTE DML

    I had set myself a task to increase my knowledge of CTEs and found some interesting things. I didn't know you could use a CTE to modify existing data either.

    The...

  • RE: MCP Business cards

    I don't know anyone who has pre-formatted MCP business cards for sale. You can get the logos you need from the MCP certified site (http://mcp.microsoft.com) and add them...

  • RE: Get 2 column result from 1 field

    Another approach using CTEs

    create table #Table1

    (

    Years int,

    [Value] int

    )

    insert #Table1(Years, [Value])

    Values

    (2000, 2)

    ,(2001, 4)

    ,(2002, 5)

    ,(2003, 3)

    ,(2004, 2)

    GO

    with SumAll(FullTotal) AS

    (SELECT SUM([value]) FROM #Table1)

    ,SumPartial(PartialTotal) AS

    (SELECT SUM([Value]) FROM...

  • RE: Help needed for creating the star schema

    Okay, I knew this was going to happen.

    Firstly, when writting a quote it is good manners to write the complete quote which reads "The Data Vault is the optimal choice...

  • RE: Help needed for creating the star schema

    Data vault is not a mix of the two models but a formal methodology in its own right that has more than a decade of design and testing behind it....

  • RE: Help needed for creating the star schema

    Unless you are stuck doing a star schema might I suggest you look at Data Vault as a better design for a data warehouse? http://www.amazon.com/Modeling-Agile-Warehouse-Vault-Volume/dp/061572308X

  • RE: SQL Date Issue

    You could also use IIF such as

    select iif(a<b,1,0) as test

  • RE: SSAS - how to view cubes

    The MS corollary to PowerView is Excel or PowerPivot. Developers can use SSMS to do limited browsing and test their MDX code. Unfortunately, you can't easily export your browse results...

Viewing 15 posts - 31 through 45 (of 46 total)