USP_CONSTITUENT_HASFIRSTNAME

Checks if a constituent has a first name.

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN
@HASFIRSTNAME bit INOUT

Definition

Copy


            create procedure dbo.USP_CONSTITUENT_HASFIRSTNAME(
                @ID uniqueidentifier,
                @HASFIRSTNAME bit = null output
            ) as begin
                set nocount on;

                if exists(select 1 from dbo.CONSTITUENT where ID = @ID and FIRSTNAME <> '') begin
                    set @HASFIRSTNAME = 1
                end else begin
                    set @HASFIRSTNAME = 0
                end

                return 0;
            end;