if exists (select * from sysobjects where id = object_id(N'pSelectedDatesExampleSelectedDatesAdd') and sysstat & 0xf = 4) drop procedure pSelectedDatesExampleSelectedDatesAdd 
GO

-- Creates a new record in the [dbo].[SelectedDates] table.
CREATE PROCEDURE pSelectedDatesExampleSelectedDatesAdd
    @p_DatesSelected ntext,
    @p_RecordId_out int output
AS
BEGIN
    INSERT
    INTO [dbo].[SelectedDates]
        (
            [DatesSelected]
        )
    VALUES
        (
             @p_DatesSelected
        )

    SET @p_RecordId_out = SCOPE_IDENTITY()

END

