• Bob Hovious (4/12/2009)


    Flo: I'm not at my laptop right now, so I can't test your code. I'll do so at the earliest opportunity. Couple of questions though:

    Why are you selecting the top (1000)?

    WHERE N < len(s.definition)-1 should handle that.

    ORDER BY N? Does it make any difference to the output?

    Why table variable @tally?

    Hi Bob

    Thanks for your help!

    Why are you selecting the top (1000)?

    The TOP(1000) is just to able to use the ORDER BY to ensure that the returned lines will not be swapped.

    ORDER BY N? Does it make any difference to the output?

    I'm not sure if a sequential result is ensured if not ordered. It is important that no lines will be swapped.

    Why table variable @tally?

    The variable @tally was only to ensure everything is available for the sample. I also tried with a usual Tally table, same result.

    Greets

    Flo