Friday, 23 September 2011

Drop Table Loop

I often, for various reasons, need to import data from external sources. Most of the time I import into tables on a staging database before further manipulating the data.

What I then tend to find after a few months is a very large and cluttered database. So below is a simple little query that creates a temp table of objects that then get dropped via a while loop. Nothing fancy, just a small time saver.

No comments: