title: Retrieving User activity from mssql for particular user else for all user
body: <pre><code>Create PROCEDURE [dbo].[sp_ReadUserActivity]
  
  @fromdate datetime,
  @todate datetime,
  @EmployeeID int,
  @Activity varchar(255)
  AS
      BEGIN
    Begin Transaction 
  
   Select * from dbo.ActivityLog where ActivityDate&lt;=@fromdate and ActivityDate&gt;=@todate
  commit transaction
  END
  </code></pre>
  
  <p>I want these things,
   If data required for all users, pass Activity as "All" else pass EmployeeID
  If data required for all activities, pass Activity as "All" else pass Particular activity</p>