Hi, I looked for any posts on this but couldn't find any, it should be pretty easy.
I have a Company table with parent_id that points to a company itself. I want to get the names of the parent, if any. So if I have my table as
cpy_id cpy_name parent_id
1111 "ABBB" 0
2222 "CDDD" 0
3333 "ABBB Japan" 1111
4444 "CDDD China" 2222
and I have a set of values (1,4) I should get the names for 1 and 2, not 1 and 4.
Thanks in advance