How can I show just the name only once?

  • simflex-897410 (9/1/2010)


    I have a quick question Wayne.

    Why didn't I just do that for only name since that's the only one we are interested in displaying first value only while leaving the rest blank?

    The issue is that when getting a value from a previous row to use in this row, that you have to guarantee the order that things will be process. That's why you need a clustered index (puts the physical table into an order), an update without a where clause (so the whole table will be processed), an "anchor" column (get the first column from the clustered index into a variable as a 2-part operation), the TABLOCKX table hint (to prevent any other process from accessing the data while you're doing this), and the MAXDOP 1 option (to prevent any parallelism). Not doing any of these (and a few other rules) will cause things to NOT be processed in the proper order. Result = bad data.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • Thank you very, very much Wayne for your help.

Viewing 2 posts - 16 through 16 (of 16 total)

You must be logged in to reply to this topic. Login to reply