I've a table with data shown as below
if you look at the above data, "3" is a followup of 1 and "5" is a followup of "3"
Similarly "4" is a followup of "2"
and 1 and 2 are original ids or parent ids.
I've to write a query that will retrieve only the parent and the last child of that parent.
I used recursion but that retrieves the entire chain. How do I further get only the parent and the last child
Considering the LOS that some folks gave you on this, allow me to ask... did you ever get an answer for this that worked for you?
is pronounced ree-bar and is a Modenism for R
First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
Although they tell us that they want it real bad, our primary goal is to ensure that we dont actually give it to them that way.
Although change is inevitable, change for the better is not.
Just because you can do something in PowerShell, doesnt mean you should. Helpful Links:
How to post code problemsHow to post performance problemsForum FAQs