May 10, 2005 at 3:14 pm
First a non-sequitur: I hate GUIDs.
You're half way there. Use IDENTITY function (SELECT IDENTITY( INT, 1, 1) AS sid ) to insert into a temp table (using TOP 100 PERCENT with ORDER BY) and order things sequentially so that you can use this field to easily join one row to the next row. Like:
(sid = name of sequential id identity column)
SELECT ...
FROM #t a
JOIN #t b on a.sid = b.sid - 1
AND a.keycols = b.keycols
Using that join method you can filter any overlaps non overlaps and suck those SIDs into another table that you can then join back to your original result set to update related columns/flags...
May 17, 2005 at 3:26 pm
Just an update:
This question has been resolved ... thank you Google ....
If anyone would like to see the solution to this dilemma, you can view the rather lengthy thread on Tek-Tips here:
http://www.tek-tips.com/viewthread.cfm?qid=1058500&page=1
John, thank you for your quick reply. I'm sorry I haven't been able to post a reply to your proposed solution. It turns out their were even bigger fish to fry in loop problem. Thanks again for your help.
Kyle.
Viewing 2 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply