查询示例
/* insert Statement */
insert into ExecutionClass(ExecutionTitle,MachineName,ProjectName,ExecutedBy,TimestampId) select top 1 ExecutionTitle, MachineName,ProjectName,ExecutedBy,TimestampId from PrimaryStaging where TimestampId=12345678910 and MachineName = Pc';
/* Update Start and End Time */
update ExecutionClass set StartTime = (select min(StartTime) from PrimaryStaging where TimestampId=12345678910 and MachineName='Stellium-PC') where TimestampId=12345678910 and MachineName='Pc'
update ExecutionClass set EndTime = (select max(EndTime) from PrimaryStaging where TimestampId=12345678910 and MachineName='PC') where TimestampId=12345678910 and MachineName='Pc'