Forum Replies Created

Viewing 15 posts - 2,746 through 2,760 (of 8,416 total)

  • RE: CTE - How to surpass the limit

    steve-893342 (9/2/2010)


    Yes precisely, the number of rows returned from the split is defined as (number of commas) + 1

    Ok, let's go with that. Thanks for persisting 🙂

    CREATE ASSEMBLY...

  • RE: CTE - How to surpass the limit

    steve-893342 (9/2/2010)


    Returns 14 rows when it should return 15

    Are you expecting the "A,B,C,D," to produce 5 records?

    To me, the trailing comma is delimiting the 'D' and so should not result...

  • RE: CTE - How to surpass the limit

    steve-893342 (9/2/2010)


    Just one minor problem that it doesn't return the last item if it's blank.

    Not sure I agree - a single trailing delimiter shouldn't return an extra blank record, should...

  • RE: Convert Mirroring to Log Shipping

    A very good article - I have no idea why it's rating is so low.

    Well done.

  • RE: The Semantics of NULL in SQL Server 2008

    I try to avoid NULLs, as far as is practicable, in my designs. They complicate coding and often result in suboptimal query performance.

    In suitable cases, I have no problem...

  • RE: CTE - How to surpass the limit

    Steve,

    I found a few spare minutes to slightly modify Adam's routine to work the way you want:

    CREATE ASSEMBLY Utility

    AUTHORIZATION dbo

    FROM ...

  • RE: Query Doubt

    Another option using EXISTS:

    SELECT *

    FROM dbo.Test T1

    WHERE EXISTS

    (

    SELECT...

  • RE: CTE - How to surpass the limit

    steve-893342 (9/1/2010)


    Great function Paul:-) Is there a way of adapting it to include a row number and return values for the blank items as well?

    Well the credit is Adam's...

  • RE: CTE - How to surpass the limit

    Neither scalar nor multi-statement UDFs show in IO stats. In-line TVFs do, because they are expanded into the query (just like a parameterized view would) before optimization.

  • RE: Temporary Functions?

    You can't create temporary functions, no.

    It sounds as if you are writing code to concatenate strings, perhaps to create a CSV-style output?

    There is an excellent performance comparison of the main...

  • RE: CTE - How to surpass the limit

    On my machine, the fastest solution is based on Adam Machanic's excellent CLR string splitter. I include it here for others to compare:

    CREATE ASSEMBLY Utility

    ...

  • RE: Large number of group bys

    An excessive number of columns in a GROUP BY clause is almost always a sign of a database design or query that has considerable scope for improvement 🙂

    Often, the GROUP...

  • RE: DEFAULT ((0)) vs DEFAULT (0)

    There's no functional difference, it's just a scripting quirk.

  • RE: does partitioning table need clustered Index?

    Partitioning does not require a clustered index at all.

    Here's a script I use to demonstrate that fact.

    It also demonstrates the indexed view switching possible in SQL Server 2008.

    If you are...

  • RE: Are the posted questions getting worse?

    Bit late to the party, but just for the record - I'm not a DBA either.

Viewing 15 posts - 2,746 through 2,760 (of 8,416 total)