Filter Employee details with hirarchy - Please help me

  • Dear sir,

    I want to fetch the employee details with different filter conditions. Please help me

    organizationdtls

    columns : oid, orgname, level, parentid

    values: 10, Unit1, 1, 0

    11, Dept1, 2, 10

    12, Dept2, 2, 10

    13, Section1, 3, 11

    Employee dtls

    columns: eid, empno, orgid

    values: 100, 1234, 13

    Can any body help me in achieving this

    when i sent values like empno : 1234 and orgid = 10

    then it should return the employee details like

    eid , empno, orgid

    100, 1234, 13

  • The way you have described, it seems like a simple join would give you the desired result. But if you could explain bit clearly it'll be possible to answer your question.

    --------
    Manjuke
    http://www.manjuke.com

  • ---

  • i have two tables organization dtls and emp dtls

    organizationdtls

    columns : oid, orgname, level, parentid

    values: 10, Unit1, 1, 0

    11, Dept1, 2, 10

    12, Dept2, 2, 10

    13, Section1, 3, 11

    Employee dtls

    columns: eid, empno, orgid

    values: 100, 1234, 13

    organization table has parentid which is related its own record

    as example... empdtls has the orgid 13 , it means employee related to section1

    when i try to fetch emp details by passing empid 1234 and org id 13 it is returning details perfetly

    Question: i need to a query where it should return same details when i pass empid 1234 and orgid = 10

    as section is related to unit indirectly

    can u give me such query

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply