Getting a File Listing from a Directory in PL/SQL

It’s General Election time here in the UK.
Rather than the traditional two-way fight to form a government, this time around we seem to have a reasonably broad range of choice.
In addition to red and blue, we also have purple and – depending on where you live in the country, multiple shades of yellow and green.
The net effect is to leave the political landscape looking not so much like a rainbow as a nasty bruise.

The message coming across from the politicians is that everything that’s wrong in this country is down to foreigners – Eastern Europeans…or English (once again, depending on your location).
Strangely, the people who’ve been running our economy and public services for the last several years tend not to get much of a mention.
Whatever we end up choosing, our ancient electoral system is not set up to cater for so many parties attracting a significant share of support.

The resulting wrangling to cobble together a Coalition Government will be hampered somewhat by our – equally ancient – constitution.

That’s largely because, since Magna Carta, no-one’s bothered to write it down.

In olden times, if you wanted to find out what files were in a directory from inside the database, you’re options were pretty undocumented as well.
Fortunately, times have changed…

What I’m going to cover here is how to use an External Table pre-process to retrieve a file listing from a directory from inside the database.
Whilst this technique will work on any platform, I’m going to focus on Linux in the examples that follow…
Continue reading

A Quick guide to Cygwin commands for the deprived of the DOS world

Things have been a bit hectic in my world lately. In addition to all the festive seasonal joy ( shopping, family, in-laws, out-laws etc) I’m in the process of changing jobs.

It is the way of such things that sometimes, you just can’t quite squeeze everything in.

The one thing I didn’t get time to finish before leaving was this DOS to BASH guide ( despite several evenings spent hacking away on Windows). So, for the CIG guys…well, it’s traditional – all kids know that there’s got to be at least one Christmas present that you can bash. Sorry. Continue reading