Forum Replies Created

Viewing 15 posts - 8,671 through 8,685 (of 10,144 total)

  • RE: Are the posted questions getting worse?

    Grant Fritchey (3/18/2009)


    I'm going to hell for this one, I just know it.

    I was checking up on the status of what I think is a bug that I posted to...

  • RE: Row By Row Summing of all previous rows?

    Here's another way:

    -- sample data

    DROP TABLE #temp

    CREATE TABLE #temp ([ChapterPageTitle] VARCHAR(9), [No.OfPages] INT)

    INSERT INTO #temp ([ChapterPageTitle], [No.OfPages])

    SELECT 'Chapter 1', 2 UNION ALL

    SELECT 'Chapter 2', 4 UNION ALL

    SELECT 'Chapter...

  • RE: Are the posted questions getting worse?

    Bruce W Cassidy (3/17/2009)


    [font="Verdana"]Happy join? :w00t:

    I miss Oracle's natural join. "Just join the two tables, dammit! I've already told you what the foreign key relationship is..."

    [/font]

    It was...

  • RE: Are the posted questions getting worse?

    Steve Jones - Editor (3/17/2009)


    Green Beer!!

    are we free associating now?

    Beer! Hell yeah we know about this stuff! You want green beer? With or without the dye?

    Check this one out 😎

    SELECT...

  • RE: Are the posted questions getting worse?

    Jack Corbett (3/17/2009)


    GilaMonster (3/17/2009)


    Bob Hovious (3/17/2009)


    I'm still hoping to one day find sp_MSGoBackInTime documented in BOL. It is THE essential tool for recovering your database when you never...

  • RE: Are the posted questions getting worse?

    There seems to be an inverse square law operating between the amount of time and effort you put into a post, and the chance of the OP responding at all...

  • RE: Are the posted questions getting worse?

    GilaMonster (3/17/2009)


    Bob Hovious (3/16/2009)


    Gail, do you have any recommendations from your part of the world?

    If you're into wines, you absolutely must not miss the Stellenbosch wines (Cape Town, South Africa)....

  • RE: How to identify the which table data value is displyed resultset by using the Union operator in sql server 2000

    rajendran.e (3/17/2009)


    Hi,

    Thanks for your reply..:)

    Mentioned Query will return duplicate value

    noo namee ...

  • RE: How to apply SUM function multiple times on a column?

    Christopher Stobbs (3/17/2009)


    does my solution not work???

    I'll test it with a million rows and see what happens...

    OH and you haven't given us an example of a different start position?

    It matches...

  • RE: How to apply SUM function multiple times on a column?

    What do you want the output to look like if @StartPosition contains 1 and @endposition contains 3?

    How do the @StartPosition and @endposition correspond to values in the table? It's not...

  • RE: how can use two subquery

    Then bring the two queries together:

    SELECT q1.No, q1.Nome, q1.SaldoCCO, q2.saldoLR

    FROM (SELECT dt.No, dt.Nome, SUM(dt.PENDENTESDEB - dt.PENDENTESCRD) AS SaldoCCO

    FROM (SELECT cc.No, cc.nome as Nome,

    -- block 1

    CASE WHEN origem =...

  • RE: how can use two subquery

    Restrict the SELECT column list to the columns we need, and get rid of the unnecessary "onion skin":

    SELECT No, Nome, SUM(PENDENTESDEB - PENDENTESCRD) AS SaldoCCO

    FROM (SELECT No, cc.nome as Nome,...

  • RE: how can use two subquery

    Since this is an "onion" select - there's a select of a select of a select - we can use one of them to calculate Saldo instead of having that...

  • RE: how can use two subquery

    Resolving the correlated subqueries as derived tables gives two CASE blocks - I guess debit and credit, and a third block which calculates the difference between the two as 'Saldo':

    SELECT...

  • RE: how can use two subquery

    Here's the same query after 10 minutes spent reformatting it to make it a little more readable:

    SELECT No, nome, SUM(Saldo) as 'SaldoCCO'

    from

    ...

Viewing 15 posts - 8,671 through 8,685 (of 10,144 total)