Relative Content

Tag Archive for sql-serverdatabase-cursor

How to get rid of CURSOR if every FETCH needs a SELECT based on previous result

We have a couple of tables, let’s call them Sections and SectionTimeWindows. Sections table contains data about sections of ‘movement’, which starts at a place, ends at a place and has a type. The type is important, because it determines how much time will a section take – every section type has a set of time windows and the window determines the running time of a section based on when we arrive at the section.