Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SET @sql = N'DELETE TOP(1000) FROM ' + @tableName + ' WHERE ItemId
- in (Select ItemId from dbo.History_Item
- WHERE (
- [FullyQualifiedName] LIKE ''' + @machine_DS + '.%'''
- OR
- [FullyQualifiedName] Like '''+ @machine_Kpi + '.%'''
- )
- )
- AND datetime between'''+ @startDate +''' And '''+ @endDate +'''
Add Comment
Please, Sign In to add comment