I have a table with following structure
Id P1 P2(HirarchyId)
----- ------ --------------
1 Name1 /1600/1601/
2 Name2 /1300/
The key of hirarchy id is foreign key of different table
Id P2
---- ------
1600 p2Name1
1601 p2Name2
1300 p2Name3
I want to write a query which can give result based on Id’s of P2 I pass.
Something Like this
select Id, P1 from TableP1 where P2 in (1600, 1300)
I know it is not possible but need some alternative to achieve this. Please let me know if it is possible or not.
1 Answer