title: SQL Server 2000 : want to use single stored procedure to return different types of SQL queries
body: <p>I've limitation to work on SQL Server 2000 on a very big project. For one module I've to create 3 to 10 stored procedures. To make it manageable I'm writing one stored procedure to return different SQL queries based on condition like:</p>
  
  <pre><code>If @QueryId = 'SelAllEmp'
     Select EmpId,EmpName from EMP 
  ELSE IF  @QueryId = 'SelEmpById'
     Select EmpId,EmpName from EMP where EmpId= @EmpId
  ELSE IF @QueryId = 'EMPDept'
     Select EmpId, DeptId, DeptName from EMPDept
  ......................................
  </code></pre>
  
  <p>My question is, are there any hidden consequences or impacts using this technique?</p>