use -------------- MTP_LAB_DB
declare @count int
declare @max int
declare @tsql nvarchar(255)
declare @tbl table(rownum int IDENTITY (1, 1) Primary key NOT NULL , cmd nvarchar(255))
insert into @tbl(cmd) select ('delete ' + name) as cmd from sys.tables
where name like 'tbl_lab_information%'
or name ='tbl_lab_Analyzer_Result'
or name like 'tbl_lab_log%'
and name <> 'tbl_lab_information_critical'
select @max = COUNT(*) from @tbl
set @count=0
while (@count <= @max)
begin
select @tsql = cmd from @tbl where rownum=@count
print @tsql
exec sp_executesql @tsql
select @count =(@count +1)
end
update tbl_lab_setup_Test_Control set Test_Text_Keyin_Flag = '1'
update tbl_lab_setup_Test set Test_Inactive = '1',Test_His_Code = 'XXX',Test_Checkup_Code=''
To embed this project on your website, copy the following code and paste it into your website's HTML: