USP_DATALIST_FIRSTNAMES

A list of first names and associated genders.

Parameters

Parameter Parameter Type Mode Description
@FIRSTNAME nvarchar(50) IN First name

Definition

Copy


CREATE procedure dbo.USP_DATALIST_FIRSTNAMES
(
    @FIRSTNAME nvarchar(50) = null
)
as
    set nocount on;

    if len(@FIRSTNAME) = 0
        set @FIRSTNAME = null;

    select 
        ID,
        FIRSTNAME,
        GENDER
    from dbo.FIRSTNAMES
    where @FIRSTNAME is null or upper(FIRSTNAME) = upper(@FIRSTNAME)
    order by FIRSTNAME