Forum Replies Created

Viewing 15 posts - 106 through 120 (of 173 total)

  • RE: Cursor

    simon phoenix (8/30/2008)


    Hi

    Rog, Jeff

    I have problem running this statement

    SELECT A.ID,A.DateValue,A.Prd,A.Statusid,

    Sum(CASE WHEN B.Statusid=2 THEN 1 ELSE 0 END)

    OVER(ORDER BY A.ID

    ...

  • RE: Cursor

    The common problem of dividing data into groups boils down to creating a dense rank. Here we want a dense rank on Statusid but ordered by ID (or DateValue). This...

  • RE: Cursor

    GSquared (8/28/2008)


    The first query breaks them up into sets, based on the SetStart and SetEnd columns and the Date column.

    The second query then takes each set and gives it a...

  • RE: Cross Tabs and Pivots, Part 1 – Converting Rows to Columns

    dphillips (8/26/2008)


    All of this aside, however, was to show that one can pull a PIVOT without NULLS, and is only for specific situations.

    I should be rich 😀

    www.rac4sql.net

    www.beyondsql.blogspot.com

  • RE: Cross Tabs and Pivots, Part 1 – Converting Rows to Columns

    Jeff Moden (8/23/2008)


    If you want to suppress NULL's caused by missing data in a Pivot, there's no other way to do it than in the final Select.

    Kudos for...

  • RE: Cross Tabs and Pivots, Part 1 – Converting Rows to Columns

    dphillips writes:

    >Without the TRANSFORM counterpart, I see absolutely no reason to

    >use it in it's current form. I would gladly hear anyone having an

    >alternate opinion.

    Nicole Bowman writes:

    >I too miss...

  • RE: Cross Tabs and Pivots, Part 1 – Converting Rows to Columns

    Jeff writes

    >Ok... show us the code that you would do it in RAC with.

    Here yago.

    Minimal Rac execute using standard defaults.

    Exec Rac

    -- Similar to Access transform, the desired aggregates.

    @transform='Sum(Amount) as Amt...

  • RE: Cross Tabs and Pivots, Part 1 – Converting Rows to Columns

    There's nothing like seeing the latest go around of PMS (pivot madness syndrome). And it seems time after time, year after year, release after release there's a contest to see...

  • RE: Dataphor

    Kudos for bringing attention to Dataphor. But I would point out that Relational 'purists' is the flip side of the idea of sql being relational-like. The latter being equivalent to...

  • RE: HOW TO CONVERT ROWS TO COLUMN

    You let something do it so you don't have to do it yourself. It's called working smart 🙂 Check out Rac, easy and powefull:

    www.rac4sql.net

    www.beyondsql.blogspot.com

  • RE: Making it pivot

    Check out RAC. It's similar to Access crosstab query but much more powerful with many options. If you like Access you'll appreciate RAC. Especially if you don't want to code...

  • RE: Using Pivot operator

    The Sql Server Pivot is a no-brainer in the pejorative sense. What were they thinking? 🙂 If you want something that doesn't insult your intelligence and isn't simply the sauce...

  • RE: rows into columns

    If you'd like to avoid the unpleasantries of dynamic sql for crosstab queries check out the RAC utility. Coding dynamic crosstabs of complexity is like watching sausage made. It can...

  • RE: Table Level Access

    There seems to be a lot of tap dancing around LINQ in the sql server community. And the most salient points about it has little to do with performance questions....

  • RE: Temp Table 'vs' Table Variable 'vs' CTE.

    Sandy Millon. (10/28/2007)


    I wants to clear my concept about Temp Table,

    Table Variable & Common Table Expression Concept.

    Some one is interested in a concept and not code? How interesting:)

    If you...

Viewing 15 posts - 106 through 120 (of 173 total)