Hi,
There is an occasional bug with the CREATE FUNCTION in the generated DDL script. Here is what I did.
- Reverse engineer a database that has a function with the following header (as per Microsoft SQL Server Management Studio):
CREATE FUNCTION [dbo].[GenerateDateWeekDayTable]
(
@StartDate datetime,
@EndDate datetime,
@DayPart char(5) – support ‘day’,‘month’,‘year’,‘hour’, default ‘day’
)
RETURNS
[…] - Use TDM to generate the DDL script to create that database.
- The same function is generated as:
CREATE FUNCTION [dbo].[GenerateDateWeekDayTable] (@StartDate datetime,
@EndDate datetime,
@DayPart char(5) – support ‘day’,‘month’,‘year’,‘hour’, default ‘day’)
RETURNS
[…]
-> As you can see, the closing parentheses is at the end of the comment rather than on a new line or after “char(5)”, which makes the DDL script invalid.
I am evaluating TDM 3.4.14.6.
gabriel