Forum Replies Created

Viewing 15 posts - 451 through 465 (of 2,171 total)

  • RE: SQL Server 2005 Paging – The Holy Grail

    Thank you for the feedback!

  • RE: How to manage huge table that contains xml

    Yes, NTEXT will be a problem.

    If you are storing XML fragments, use XML datatype!

  • RE: Multi Column Sort

    If there is a discrepancy between your test data and the test data supplied by both Mr Magoo and Mr Young, I would like to know.

    The 2nd revision of the...

  • RE: Performance issue with tally solution

    No problem Mr White.

    CREATE FUNCTION dbo.fnParseList

    (

    @Text NVARCHAR(MAX)

    )

    RETURNS @Result TABLE (RowID SMALLINT IDENTITY(1, 1) PRIMARY KEY, Data NVARCHAR(MAX))

    AS

    BEGIN

    DECLARE@NextPos INT,

    @LastPos INT,

    @Delimiter NCHAR(2)

    SELECT@Delimiter = NCHAR(13) + NCHAR(10),

    @NextPos = CHARINDEX(@Delimiter, @Text, 1),

    @LastPos = 0

    WHILE...

  • RE: How to manage huge table that contains xml

    Put a clustered index on the table and the IDENTITY column.

    Then create index over XML column.

  • RE: Performance issue with tally solution

    Or a faster split UDF?

    --- -> Peso solution

    PRINT 'Start Peso solution'

    SELECT @now = GETDATE()

    --- Split text into lines

    INSERT INTO @result

    SELECT l.data

    FROM @source s

    CROSS APPLY dbo.fnParseList(CHAR(13), s.definition) l

    --- Results

    SELECT @duration =...

  • RE: Multi Column Sort

    It's OK! Don't worry.

    I have nothing to do besides awaiting the results from Adam's competition.

    And for jsanborn to test the 2nd revision of the algorithm.

  • RE: Multi Column Sort

    Thank you both.

    Let's hear what Barry has to say about it.

    Attached are second revision to deal with sample data provided by Barry.

    It also works with the sample data provided by...

  • RE: Multi Column Sort

    Greate job Chris!

    But you too will have to check for mutually exclusive records as with Mr Magoos test data.

    EDIT: I tried your algorithm with the sample data provided by Mr...

  • RE: Multi Column Sort

    Here is the revised algorithm, together with complete testcase from Mr Magoo.

  • RE: Multi Column Sort

    Yes, becuase records 88-89 are mutually exclusive with record 90, since neither one of record 88-89 have common columns with record 90.

    This edit seems to fix the problem

    GROUP BYID,

    minValue

    HAVINGSUM(CASE WHEN...

  • RE: Multi Column Sort

    I can spot the error in my algorithm now.

    Record 80 and 81 are mutually exclusive, because they have no common columns populated so both records fulfill the criteria of having...

  • RE: Multi Column Sort

    I guess everyone's happy with the suggestion posted 4/10/2009 8:44 PM?

  • RE: Multi Column Sort

    Attached is a zip-file with working solutions for original problem.

    Both files contains same algorithm.

    One file is based on Barry's test data and one file is based on jsanborn's latest sample...

Viewing 15 posts - 451 through 465 (of 2,171 total)