Home Forums SQL Server 2012 SQL Server 2012 - T-SQL insert does not insert in any order. RE: insert does not insert in any order.
Hugo Kornelis
SSC Guru
Points: 64780
More actions
February 7, 2016 at 8:29 am
#1857041
Again, if you really need to loop you can do so without temp table.
DECLARE MyCurs CURSOR LOCAL FAST_FORWARD
FOR SELECT brId, sdate
FROM Somewhere
ORDER BY sdate, brId;