get data from two table from single stored procedure? : i have two tables one is for task and one for alljobs.i am giving departmentid to sp and want to get all the jobid from task table and job table and return all detail of these jobs from jobid table...please tell me if there is any solution.

this is my task table
[![enter image description here][1]][1]


this is my job table
[![enter image description here][2]][2]


  [1]: http://i.stack.imgur.com/EWGd5.png
  [2]: http://i.stack.imgur.com/TcPBC.png



In task table the parameter department id goes to AssignedToDepartmentId.
In JobId table the parameter depatment id goes to DepartmentId

First get all jobid from both tables by departmentid and then get details of all jobid and return detail of jobid.