SQL Subqueries
Subject:   need answer..
Date:   2007-02-17 02:53:52
From:   rajii
i have related two tables.
table name are "usermanagementtable" and "projectstable"

usermanagementtable have Employeeid's of project manager,teamleader,associate has other coloumn called designation.(designation will be manager,teamleader,associate projects).

projectstable has project manager EmpID who are assigned to some projects.

here i set usermanagementtable Employeeid as primary key and projectstable Employeeid as foriegn key.

now i need projects manager empid from usermanagementtable where those id should not be in projects table..

that is project manager id's who has not assigned to any

can anyone answer this please...

Main Topics Newest First

Showing messages 1 through 1 of 1.

  • answer for this
    2007-04-02 21:44:52  sethumeena [View]

    if u this following subquery u can easily reteive the answer for ur question.i ve checked. u also check with program and inform.

    select a.emplid,a.designation from usermanage_tbl a where a.designation='pm' and
    a.emplid not in(select a.emplid from projectable_tbl b where a.emplid=b.emplid)