|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Saturday, May 18, 2013 9:51 AM
Points: 12,
Visits: 132
|
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, December 06, 2012 5:03 AM
Points: 3,
Visits: 62
|
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, September 24, 2012 6:15 AM
Points: 8,
Visits: 148
|
|
Hello many pb when compiling SP
Msg 102, Level 15, State 1, Line 2 Incorrect syntax near ' '. Msg 102, Level 15, State 1, Line 13 Incorrect syntax near ' '. Msg 102, Level 15, State 1, Line 21 Incorrect syntax near ' '. Msg 102, Level 15, State 1, Line 22 Incorrect syntax near ' '. Msg 102, Level 15, State 1, Line 22 Incorrect syntax near ' '. Msg 102, Level 15, State 1, Line 23 Incorrect syntax near ' '. Msg 102, Level 15, State 1, Line 23 Incorrect syntax near ' '. Msg 102, Level 15, State 1, Line 24 Incorrect syntax near ' '. Msg 102, Level 15, State 1, Line 24 Incorrect syntax near ' '. Msg 102, Level 15, State 1, Line 26 Incorrect syntax near ' '. Msg 102, Level 15, State 1, Line 28 Incorrect syntax near ' '. Msg 137, Level 15, State 2, Line 32 Must declare the scalar variable "@Create_Table_Ind". Msg 156, Level 15, State 1, Line 76 Incorrect syntax near the keyword 'THEN'. Msg 137, Level 15, State 2, Line 88 Must declare the scalar variable "@PK_Ind". Msg 137, Level 15, State 2, Line 150 Must declare the scalar variable "@FK_Ind". Msg 137, Level 15, State 2, Line 194 Must declare the scalar variable "@Check_Ind". Msg 137, Level 15, State 2, Line 213 Must declare the scalar variable "@Default_Ind". Msg 102, Level 15, State 1, Line 252 Incorrect syntax near 'END'.
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Saturday, May 18, 2013 9:51 AM
Points: 12,
Visits: 132
|
|
| This SP should be used in SQL Server 2008 version and use the signature as mentioned at the end of the SP.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, September 24, 2012 6:15 AM
Points: 8,
Visits: 148
|
|
Hi, thank's for response,
does it work in SQL2005 please ?
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Saturday, May 18, 2013 9:51 AM
Points: 12,
Visits: 132
|
|
| It can but the SP will have to be tweaked to make it work in 2005 ...
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Monday, January 07, 2013 5:27 AM
Points: 78,
Visits: 84
|
|
This is a great script - really helpful - thank you!
Can I suggest a tweak for computed columns too?
Computed columns get created as a regular columns such as varchar(100) but if you left join to sys.computed_columns and use the [definition] column you end up with a column definition like this:
[Fullname] AS (([Firstname]+' ')+[Lastname]),
Hope this helps someone else out there :D
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Thursday, February 21, 2013 8:03 AM
Points: 264,
Visits: 181
|
|
Not sure if I have done something wrong here, but when generating the script for a table it's not generating the size for DECIMAL & NUMERIC columns?
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Saturday, May 18, 2013 9:51 AM
Points: 12,
Visits: 132
|
|
| Can you send the structure of your table?
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Thursday, February 21, 2013 8:03 AM
Points: 264,
Visits: 181
|
|
This is just a table I created to test:
CREATE TABLE [dbo].[Table_1]( [col1] [nchar](10) NOT NULL, [col2] [numeric](25, 12) NULL, [col3] [xml] NULL, [col4] [decimal](18, 0) NULL, [col5] [varchar](max) NULL, [col6] [varbinary](50) NULL, [col7] [money] NULL, [col8] [ntext] NULL, [col9] [text] NULL, [col10] [float] NULL, [col11] AS ([col5]+'aaa'), [col12] [dbo].[ga_money] NOT NULL )
Obviously ga_money is a user defined data type
|
|
|
|