...
i@1001 : Integer;
DimNo@1000 : Integer;
BEGIN
TableNameUpgradeDimTable := STRSUBSTNO('%1$upgrade%2_Dim',SQLMgt.StringConvert(COMPANYNAME),DimTableID);
// Delete the following line,
TableNameUpgradeDimSetID := STRSUBSTNO('%1$upgrade%2_DimSetID',SQLMgt.StringConvert(COMPANYNAME),DimTableID);
TableNameUpgradeTableID := STRSUBSTNO('%1$upgrade%2_TableID',SQLMgt.StringConvert(COMPANYNAME),DimTableID);
DimEntryQry := 'select DISTINCT';
i := 1;
...
...
i@1001 : Integer;
DimNo@1000 : Integer;
BEGIN
TableNameUpgradeDimTable := STRSUBSTNO('%1$upgrade%2_Dim',SQLMgt.StringConvert(COMPANYNAME),DimTableID);
// Add the following line.
TableNameUpgradeDimSetID := STRSUBSTNO('%1$upgrade%2_DimSetID_%3',SQLMgt.StringConvert(COMPANYNAME),DimTableID,CREATEGUID);
TableNameUpgradeTableID := STRSUBSTNO('%1$upgrade%2_TableID',SQLMgt.StringConvert(COMPANYNAME),DimTableID);
DimEntryQry := 'select DISTINCT';
i := 1;
...
...
DimSetQry :=
DimSetQry +
STRSUBSTNO(
' alter table [%1] add ID int identity ' +
// Delete the following lines.
' alter table [%1] add constraint pk_dim%2_id primary key (ID) ',
TableNameUpgradeDimSetID,DimTableID);
// End of the lines.
i := 1;
WHILE (i < 5) AND (DimTableKeyFields[i + 1,1] <> '') DO BEGIN
IF i > 1 THEN
...
...
DimSetQry :=
DimSetQry +
STRSUBSTNO(
' alter table [%1] add ID int identity ' +
// Add the following lines.
' alter table [%1] add constraint [pk_dim%2_id_%3] primary key (ID) ',
TableNameUpgradeDimSetID,DimTableID,CREATEGUID);
// End of the lines.
i := 1;
WHILE (i < 5) AND (DimTableKeyFields[i + 1,1] <> '') DO BEGIN
IF i > 1 THEN
...