(我们可以使用bcp util?

时间:2018-03-21 17:50:53

标签: sql-server bcp

查询示例

/* 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'

0 个答案:

没有答案