0% found this document useful (0 votes)
23 views

Delete Top (99) Percent From (Dbo) - (Data - Log)

This SQL statement deletes the top 99 percent of records from the DATA_LOG table in the dbo schema. It also deletes any records from the DATA_LOG table in the CIMPLICITY schema where the timestamp column is not within the last 2 months.
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Delete Top (99) Percent From (Dbo) - (Data - Log)

This SQL statement deletes the top 99 percent of records from the DATA_LOG table in the dbo schema. It also deletes any records from the DATA_LOG table in the CIMPLICITY schema where the timestamp column is not within the last 2 months.
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

DELETE TOP (99) PERCENT FROM [dbo].

[DATA_LOG];

Delete from [CIMPLICITY].[dbo].[DATA_LOG]


WHERE [[timestamp]] not between DATEADD(MONTH,-2,GETDATE()) and GETDATE();

You might also like