I have sql table with 3 columns id, parentid and name.I have attached the table i have .
Also i have attched the table output i want.
In the name column ,there are so may values out which yes and no are two values which occur more than once.
I want to give parentid in the row corresponding to these yes and no values.
the parentid for each of these row will be different.
This parent id for any of these row will be the id of the row just above it.
i tried it.but every yes is getting same parentid value and every no value is getting a common value.
how can i correct it?it will be very kind of you to help me.