Код |
---|
<br><br>CREATE PROCEDURE [dbo].[ClearLog] @Date DateTime, @ServerID int<br>AS<br>BEGIN<br> DELETE FROM AdminGroupLog WHERE ([Time]<@Date) and (ServerID=@ServerID)<br> <br> DELETE FROM AdminLog<br> WHERE ([Time]<@Date) and (ServerID=@ServerID)<br> <br> DELETE FROM AVLog<br> WHERE ([Time]<@Date) and (ServerID=@ServerID)<br> <br> DELETE FROM ExtCounterLog<br> WHERE ([Time]<@Date) and (ServerID=@ServerID)<br> <br> DELETE FROM NetStatLog<br> WHERE ([Time]<@Date) and (ServerID=@ServerID)<br> <br> DELETE FROM ProxyLog<br> WHERE ([Time]<@Date) and (ServerID=@ServerID)<br> <br> DELETE FROM SMTPFltLog<br> WHERE ([Time]<@Date) and (ServerID=@ServerID)<br> <br> DELETE FROM SMTPSendLog<br> WHERE ([Time]<@Date) and (ServerID=@ServerID)<br> <br> DELETE FROM SMTPTraceLog<br> WHERE ([Time]<@Date) and (ServerID=@ServerID)<br> <br> DELETE FROM TariffLog<br> WHERE ([Time]<@Date) and (ServerID=@ServerID)<br> <br> DELETE FROM UserBillLog<br> WHERE ([Time]<@Date) and (ServerID=@ServerID)<br> <br> DELETE FROM UserCounterLog<br> WHERE ([Time]<@Date) and (ServerID=@ServerID)<br> <br> DELETE FROM UserLog<br> WHERE ([Time]<@Date) and (ServerID=@ServerID)<br>END<br><br> |
Формат даты '31.01.2009'