I'm trying to clean up a long-used database that hasn't been the most well-maintained. One really tedious aspect is the hundreds of queries that have been built, run a time or two, and then just left abandoned like so much scrap.
Doesn't anyone know of an automated method for basically exporting the SQL for all of those queries into text files? My current method involves opening each query in SQL view and copy/pasting into a text file of the same name. It would be really helpful to do it all in one or a couple of passes.
A few notes:
* I don't know (without digging in) which queries are currently being used regularly or intermittently (e.g., annually).
* I've been directed not to "just delete" because we could have public information requests and need to pull a set of data "as it was originally pulled to make sure it is the same data".
I'd love to hear how other folks would (or have) handle(d) such a task.
Doesn't anyone know of an automated method for basically exporting the SQL for all of those queries into text files? My current method involves opening each query in SQL view and copy/pasting into a text file of the same name. It would be really helpful to do it all in one or a couple of passes.
A few notes:
* I don't know (without digging in) which queries are currently being used regularly or intermittently (e.g., annually).
* I've been directed not to "just delete" because we could have public information requests and need to pull a set of data "as it was originally pulled to make sure it is the same data".
I'd love to hear how other folks would (or have) handle(d) such a task.