spGetChangedApprovedClassNotesCount
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ClientID | int | IN | |
@LastEndPoint | datetime | IN | |
@NewEndPoint | datetime | INOUT |
Definition
Copy
CREATE procedure
[dbo].[spGetChangedApprovedClassNotesCount]
(@ClientID int,@LastEndPoint datetime,@NewEndPoint datetime out)
as
begin
set nocount on
select @NewEndPoint=getutcdate()
Select count(cyn.[ID])
from dbo.ClassYearNotes cyn
inner join dbo.ClientClassYears ccy on cyn.ClientClassYearsID=ccy.[ID]
where cyn.ModifiedDate > @LastEndPoint
and cyn.ModifiedDate <=@NewEndPoint
and cyn.IsApproved=1
and dbo.fnGetRecordIDFromLinkedUserID(cyn.OwnerID, 0) > 0
end