123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 |
- use [28] -- 要修改的数据库;
- declare @olddt nvarchar(50)
- declare @newdt nvarchar(50)
- set @olddt = '2010' -- 现有数据库订单时间;
- set @newdt = '2009' -- 指定修改后的订单时间;
- set @olddt = '2011' -- 现有数据库订单时间;
- set @newdt = '2010' -- 指定修改后的订单时间;
- set @olddt = '2012' -- 现有数据库订单时间;
- set @newdt = '2011' -- 指定修改后的订单时间;
- set @olddt = '2013' -- 现有数据库订单时间;
- set @newdt = '2012' -- 指定修改后的订单时间;
- set @olddt = '2014' -- 现有数据库订单时间;
- set @newdt = '2013' -- 指定修改后的订单时间;
- set @olddt = '2015' -- 现有数据库订单时间;
- set @newdt = '2014' -- 指定修改后的订单时间;
- update bakstate set date = replace(date, @olddt, @newdt)
- update burncdreg set date = replace(date, @olddt, @newdt)
- update client set id = replace(id, @olddt, @newdt)
- update client2 set date = replace(date, @olddt, @newdt)
- update client2phonerecord set datetime = replace(datetime, @olddt, @newdt)
- update client2phonerecordout set datetime = replace(datetime, @olddt, @newdt)
- update client3 set date = replace(date, @olddt, @newdt)
- update client3phonerecord set datetime = replace(datetime, @olddt, @newdt)
- update client3phonerecordout set datetime = replace(datetime, @olddt, @newdt)
- update digitalwork set
- date1 = replace(date1, @olddt, @newdt)
- ,date2 = replace(date2, @olddt, @newdt)
- ,date3 = replace(date3, @olddt, @newdt)
- ,id = replace(id, @olddt, @newdt)
- update dindan set
- time1 = replace(time1, @olddt, @newdt)
- ,time2 = replace(time2, @olddt, @newdt)
- ,time3 = replace(time3, @olddt, @newdt)
- ,time4 = replace(time4, @olddt, @newdt)
- ,time5 = replace(time5, @olddt, @newdt)
- ,time6 = replace(time5, @olddt, @newdt)
- ,time7 = replace(time7, @olddt, @newdt)
- ,time8 = replace(time8, @olddt, @newdt)
- ,time9 = replace(time9, @olddt, @newdt)
- ,time10 = replace(time10, @olddt, @newdt)
- ,taketime = replace(taketime, @olddt, @newdt)
- ,payed3time = replace(payed3time, @olddt, @newdt)
- ,payed4time = replace(payed4time, @olddt, @newdt)
- ,datetime4 = replace(datetime4, @olddt, @newdt)
- ,datetime5 = replace(datetime5, @olddt, @newdt)
- ,datetime6 = replace(datetime6, @olddt, @newdt)
- ,xplrtime = replace(xplrtime, @olddt, @newdt)
- ,id = replace(id, @olddt, @newdt)
- update dindanbukuan set
- date = replace(date, @olddt, @newdt)
- ,id = replace(id, @olddt, @newdt)
- update dindanbukuan2 set
- date = replace(date, @olddt, @newdt)
- ,id = replace(id, @olddt, @newdt)
- update dindanjd set
- date = replace(date, @olddt, @newdt)
- ,inputtime = replace(inputtime, @olddt, @newdt)
- ,id = replace(id, @olddt, @newdt)
- update dindansp set
- date1 = replace(date1, @olddt, @newdt)
- ,date2 = replace(date2, @olddt, @newdt)
- ,date3 = replace(date3, @olddt, @newdt)
- ,date4 = replace(date4, @olddt, @newdt)
- ,hqdate = replace(hqdate, @olddt, @newdt)
- ,id = replace(id, @olddt, @newdt)
- update dindansp2 set
- date = replace(date, @olddt, @newdt)
- ,id = replace(id, @olddt, @newdt)
- update dresshire set
- date = replace(date, @olddt, @newdt)
- ,date1 = replace(date1, @olddt, @newdt)
- ,date2 = replace(date2, @olddt, @newdt)
- ,id = replace(id, @olddt, @newdt)
- update dresshiredata set
- returndate = replace(returndate, @olddt, @newdt)
- ,date1 = replace(date1, @olddt, @newdt)
- ,date2 = replace(date2, @olddt, @newdt)
- ,id = replace(id, @olddt, @newdt)
- update dressinfo set
- date = replace(date, @olddt, @newdt)
- update employeephonerecord set
- datetime = replace(datetime, @olddt, @newdt)
- update employeephonerecordout set
- datetime = replace(datetime, @olddt, @newdt)
- update fixedassets set
- date = replace(date, @olddt, @newdt)
- update gudingfeiyong set
- dat = replace(dat, @olddt, @newdt)
- update hospitalclient set
- date1 = replace(date1, @olddt, @newdt)
- ,inputdate = replace(inputdate, @olddt, @newdt)
- ,id = replace(id, @olddt, @newdt)
- update hospitalclientcontactreg set
- bookingdate = replace(bookingdate, @olddt, @newdt)
- ,alarmdate = replace(alarmdate, @olddt, @newdt)
- ,id = replace(id, @olddt, @newdt)
- update insidemsg set
- timestamp = replace(timestamp, @olddt, @newdt)
- update log set
- date = replace(date, @olddt, @newdt)
- update loginsign set
- date = replace(date, @olddt, @newdt)
- update lonindata set
- datetime = replace(datetime, @olddt, @newdt)
- update membercard2 set
- date = replace(date, @olddt, @newdt)
- update mywork set
- datetime = replace(datetime, @olddt, @newdt)
- ,inputdate = replace(inputdate, @olddt, @newdt)
- ,id = replace(id, @olddt, @newdt)
- update singleincome set
- dat = replace(dat, @olddt, @newdt)
- update singleincomemoney set
- date = replace(date, @olddt, @newdt)
- update sendreg set
- timestamp = replace(timestamp, @olddt, @newdt)
|