SQL Server Stored Procedure Issue. Get Multiple result From Database -


Here are my stored procedures for getting a list of employees and their term is StartDate and

End date .

  ALTER process [dbo]. [Usp_get_employeehourlyreport] @startdate datetime, select as dendetime * Start with * (Select (Register with fullName registration User ID: Usertime.USIRID) Full name, ISUN.NLL (SAM (hours work), 0) Username The hours worked, where check in between CheckArt and @Adidate Group, checkin between checkin) TBL and  

I'm getting the result:

  Full name hour Antonio Jake 0 Antonio Jake 0.016 666  

So basically it is displaying a row additional with 0 hours. I have no duplicates in my database full name

The table structures are:

USERTIME :

  UserTimeI D int uncheck userID int checked check date datetime Gone LoginStatus Navarraction (50) Checked Day varchar (50) Checked hours Workflow Checked date nvarchar (50) Checked  

Registration : < / P>

  UserId int unchecked full name varchar (50) checked  

Try something like this ....

  Optional process [dbo]. [Usp_get_employeehourlyreport] @startdate datetime, set as @enddate datetime from the beginning; Select R. FULL NAME, ISNULL (SM (U.T. Horse Work), 0) AS Total_Arrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr Reply User full name, ISNUL (SM (hours work), 0) Hours working with UsTime and UT Check in & gt; = @startdate and UT. Check in & lt; = Rend by @endendate GROUP Full name name END  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -