November 26, 2013 at 9:22 pm
Comments posted to this topic are about the item Create tables and indexes with a Store Procedure
November 27, 2013 at 2:53 am
Hi
I'm afraid it doesn't seem to work for smallint columns or table names with spaces in them...
Jeff
November 27, 2013 at 5:53 am
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.
November 27, 2013 at 12:57 pm
If you look at the script you figure out that some data type must be implemented to fit all your needs. Unfortunately, I did not need to use other data type for my needs but it is quite simple to implement those I missed.
Just check the script and add data type you need.
As soon as I'll get some spare time, I'll update the script for you all.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply