• It looks like a useful script after a little debugging. It's not returning a valid format for date fields. Here is an example that was created using the script. The script is adding a length value to the date field.

    CREATE TABLE [dbo].[Claims_Report]

    (

    [MonthEndDate] [date] (3) NULL

    ,[Initial_Closed] [float] (8) NULL

    ,[Initial_Received] [float] (8) NULL

    ,[Initial_Percentage] [float] (8) NULL

    ,[Final_Closed] [float] (8) NULL

    ,[Final_Received] [float] (8) NULL

    ,[Final_Percentage] [float] (8) NULL

    ) ON [PRIMARY]

    GO

    result:

    Msg 2716, Level 16, State 1, Line 4

    Column, parameter, or variable #1: Cannot specify a column width on data type date.