I have a table with a primary key that is a persisted computed column. I have a relationship from this table to another table. When I generate the DDL, the other table has the column name but has a blank type:
e.g. It generates something like:
CREATE TABLE [MyTable]
(
[MyTableId] AS datepart(YEAR,ReferenceDate) * 10000 + datepart(MONTH, ReferenceDate) * 100 + datepart(DAY, ReferenceDate) PERSISTED NOT NULL,
[ReferenceDate] Date NOT NULL,
[DayOfWeek] AS upper(datename(DW,ReferenceDate))
)
CREATE TABLE [OtherTable]
(
[OtherTableId] Int NOT NULL,
[MyTableId] AS , – HERE IS THE PROBLEM (AND YOU CAN’T OVERRIDE THE TYPE IN TOAD MODELER!)
[Value] Float NOT NULL
)