fnTransactions_GetUnprocessedVolunteers

Return

Return Type
table

Parameters

Parameter Parameter Type Mode Description
@ClientID int IN

Definition

Copy


            CREATE FUNCTION dbo.fnTransactions_GetUnprocessedVolunteers
                (
                @ClientID int
                )
            RETURNS TABLE
            AS
            RETURN 
            (
            SELECT TOP 100 PERCENT VolunteerTransactions.ID, VolunteerTransactions.DateAdded, VolunteerTransactions.AddedBy, VolunteerTransactions.XMLObjectData
            FROM dbo.VolunteerTransactions 
            JOIN dbo.SiteContent ON VolunteerTransactions.VolunteerOpID = SiteContent.ID
            WHERE SiteContent.ClientSitesID = @ClientID
              AND VolunteerTransactions.ProcessedDate IS NULL AND VolunteerTransactions.IsDeleted = 0
            ORDER BY VolunteerTransactions.ID
            )