Women in Technology

Hear us Roar



Article:
  Self-Inflicted SQL
Subject:   Find Child
Date:   2007-12-17 10:41:37
From:   nv_thien
Response to: sql

EmployeeID EmployeeName ManagerID
61 Sue Smith (null)
62 David Jones 61
63 Troy Parker 62
64 Claire 63
65 Grover Rivers 64
66 Grover Rivers 62
67 Grover Rivers 63


can you help me.
i want to make procedure and pass @EmployeeID
it'll return all childs


*** for example 1 : GetChild 62
it'll return to
EmployeeID EmployeeName ManagerID
63 Troy Parker 62
64 Claire 63
65 Grover Rivers 64


66 Grover Rivers 62
67 Grover Rivers 63


*** for example 2 : GetChild 63
it'll return to
EmployeeID EmployeeName ManagerID


64 Claire 63
65 Grover Rivers 64
67 Grover Rivers 63