sql - How to prevent duplication in view when item is child of an element and also parent of itself -


have mapping table consist of data

parent_sys_object_id    sys_object_id        18                    38        38                    38 

and inside view have 2 condition case statement

when se.sys_object_id = 38 , psom.parent_sys_object_id = 18 when se.sys_object_id = 38 , psom.parent_sys_object_id = 38 

however happen 1 case not other. meaning 1 case have data, other case have null.

how should fix this?

thanks bunch!


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -