if not Exists(SELECT * FROM information_schema.tables where Table_name = 'Finance_Cycle_Detail') begin create table dbo.Finance_Cycle_Detail ( ID int Primary key, FC_ID int references Finance_Cycle(ID) not null, [Year] int not null, [Month] int not null, [Day] int not null, Dom_ID_DayOfWeek int references Domain(ID) not null, JDate int not null, GDate Date not null ) end