SQL2000 code - interesting problem


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: SQL2000 code - interesting problem

  1. #1
    Join Date
    Aug 2004
    Posts
    43,023

    SQL2000 code - interesting problem

    [Originally posted by Mark]

    ˙ ˙ ˙  ManagerID˙ EmployeeID
    ˙ ˙ ˙ ˙ 1˙ ˙ ˙ ˙ ˙ ˙ ˙ ˙ 3
    ˙ ˙ ˙ ˙ 3˙ ˙ ˙ ˙ ˙ ˙ ˙ ˙ 4
    ˙ ˙ ˙ ˙ 4˙ ˙ ˙ ˙ ˙ ˙ ˙ ˙ 5
    ˙ ˙ ˙ ˙ 6˙ ˙ ˙ ˙ ˙ ˙ ˙ ˙ 7
    ˙ ˙ ˙ ˙ 7˙ ˙ ˙ ˙ ˙ ˙ ˙ ˙ 8
    Above is a table structure.I want to be able to create a stored procedure that accepts a ManagerID. This stored procedure should return the structure of the employees i.e.
    exec GetEmployees 1
    should return employees:
    ˙ ˙ ˙ ˙ ˙ ˙ ˙ ˙ 3
    ˙ ˙ ˙ ˙ ˙ ˙ ˙ ˙ 4
    ˙ ˙ ˙ ˙ ˙ ˙ ˙ ˙ 5
    I need to know the code or algorithm to produce this result.Thanks in advance !!!

  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    Re:SQL2000 code - interesting problem

    [Originally posted by Nick Dawkes]

    Need more info as I read
    GetEmployees 1
    Should get all employees with a managerID = 1 that is only employee 3 according to your table
    S I don't understand the question

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center