• Erin Ramsay (3/18/2013)


    What about taking the row_number out of vw_BatchItems completely and putting row_number() over (order by DateEntered) in the usp_sel_BatchItems view?

    In this case that will not work as the code base uses this same view to provide an interface for the entity framework. The developer team uses this view in this context even though they don't call it directly. Otherwise that would work perfectly as we've even tested that. This is the primary reason why we are most likely going to just maintain a column to contain this information and scrap the usage of ROW_NUMBER() altogether in this case.