Forum Replies Created

Viewing 15 posts - 1,006 through 1,020 (of 1,249 total)

  • RE: display all data from row 1 but include sum total of all rows amount column in data set

    Rhythmk's solution does exactly what you want or the alteration to my solution below will do the same, although much less elegantly.

    SELECT

    q.[Description]

    ,SUM(s.totSum)

    FROM #Question q

    CROSS APPLY

    (

    ...

  • RE: display all data from row 1 but include sum total of all rows amount column in data set

    I see, so you want whatever is the first description value to be the description that is displayed.

    How is the ordering done? Is it done on the value of the...

  • RE: No Files For You

    John Mitchell-245523 (6/18/2014)


    Ed Wagner (6/18/2014)


    On site means on site, not Azure - plain and simple.

    Precisely. All on-site databases are 2012, meaning 2000 can't be the answer. And since...

  • RE: display all data from row 1 but include sum total of all rows amount column in data set

    CREATE TABLE #Question ([Description] VARCHAR(15), [Amount] INT)

    INSERT INTO#Question

    SELECT 'Bob', 10 UNION ALL

    SELECT 'Tim',20 UNION ALL

    SELECT 'Jim',30

    SELECT

    [desc] =q.[Description]

    ,amt = SUM(s.totSum)

    FROM #Question q

    CROSS APPLY

    (

    SELECT

    totSum...

  • RE: No Files For You

    GilaMonster (6/18/2014)


    Koen Verbeeck (6/18/2014)


    The answer is incorrect.

    The question clearly states that the databases are on site. Thus, by the process of elimination, the corruption answer is the only one left.

    Except...

  • RE: No Files For You

    Toreador (6/18/2014)


    You are working for a company that has uses SQL 2012 for their on site databases. A fellow DBA is trying to do a quick check on a database...

  • RE: No Files For You

    Koen Verbeeck (6/18/2014)


    BWFC (6/18/2014)


    Koen Verbeeck (6/18/2014)


    BWFC (6/18/2014)


    You are working for a company that has uses SQL 2012 for their on site databases.

    This explicitly rules out that the databases are...

  • RE: No Files For You

    Koen Verbeeck (6/18/2014)


    BWFC (6/18/2014)


    You are working for a company that has uses SQL 2012 for their on site databases.

    This explicitly rules out that the databases are in the cloud,...

  • RE: No Files For You

    You are working for a company that has uses SQL 2012 for their on site databases.

    This explicitly rules out that the databases are in the cloud, the answer to...

  • RE: CTE DML

    rhythmk (6/17/2014)


    BWFC (6/17/2014)


    rhythmk (6/17/2014)


    Thanks for question.It reminds me the trick to delete the duplicate records in a table 🙂

    Could you enlighten me on that please? It sounds very useful.

    Here...

  • RE: Order of the result issue in T-SQL

    How is the order you want being decided? They appear essentially random to me.

  • RE: Date format conversion

    What Koen said.

    Yesterday I was wondering why we had some call data with a 1753 date on it. I thought it was our problem until I looked up that.

    Edited...

  • RE: View read only acess

    If you read this article it should point you in the right direction. It will be almost impossible to write the exact query you need from the...

  • RE: Are the posted questions getting worse?

    On the subject of cricket, and indeed watching sport in general, I learned a very useful little tip yesterday to make it much more easy to discreetly keep an eye...

  • RE: CTE DML

    rhythmk (6/17/2014)


    Thanks for question.It reminds me the trick to delete the duplicate records in a table 🙂

    Could you enlighten me on that please? It sounds very useful.

Viewing 15 posts - 1,006 through 1,020 (of 1,249 total)