INSERT INTO TCourse(FId,FNo,FName,FBriefCode,FItemId,FPackId,FSequence,FTypeId,FTimes,FFreeTimes,FDurable,FValidityPeriodUnit,FValidityPeriod,FCreateDate,FExpiredDate,FDescription,FEnabled,FPrice,FAmount,FCalcMode) SELECT dbo.FNNewId() AS FId, I.FNo + 'L1' AS FNo, I.FName + '-' + 'ÁƳÌ1' AS FName, '''' AS FBriefCode, I.FId AS FItemId, 0 AS FPackId, 1 AS FSequence, (SELECT FId FROM TBasicType WHERE FKey = 'CourseType') AS FTypeId, 1 AS FTimes, 0 AS FFreeTimes, 0 AS FDurable, 0 AS FValidityPeriodUnit, 0 AS FValidityPeriod, getdate() AS FCreateDate, NULL AS FExpiredDate, '''' AS FDescription, 1 AS FEnabled, I.FPrice AS FPrice, I.FPrice AS FAmount, 1 AS FCalcMode FROM TItem AS I WHERE FId NOT IN(SELECT FItemId FROM TCourse)