Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Removing the last child record from same parent if seque
Message
From
29/06/2015 11:43:57
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2012
Application:
Web
Miscellaneous
Thread ID:
01621484
Message ID:
01621554
Views:
36
>I don't understand your question. BTW, the query should be
>
>select * from cteRanges where Grp = 0 and RowNumber >=2 and Status = 7
>
>The idea is to mark consecutive ranges of the particular status.

Yes, I did added the Status=7. But, that would not work.

The sequence could be as follow:

Created
Uploaded
Completed
Assigned
Completed
Completed

So, basically, in that case, only the last one should be removed as the first Completed is followed by a different status. The duplicates are only for those Completed, at the end.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform