I have a db in sql 2008 with 40 tables:
On each table there is a DateTime column ranging from
2010-01-01 09:00:00.000 up to 2012-01-23 22:00:00.000
I need a query to delete data for all tables only in time range from 17:31:00.000 up to 22:00:00.000
Result would be in having same days as of now but with time range from 09:00:00.000 to 17:30:00.000
Help me regarding this.
Thank you very much
For all the tables use this:
But I have a doubt about that ALL your tables have the same column 😎
If you want to check what errors appeared during run, try this: