SQL Snippets ™: Tutorials for Oracle Developers
Read Using SQL Snippets ™ before using any of this site's sample code or techniques on your own systems.
The SQL Snippets Story
If you made it to this point in the site then you are probably wondering who this Joe Fuda character is or what this site all about. Since this is my first ever blog post I think answering those questions would be a good place to start.
My career as a database programmer started when I joined Oracle Corp. Canada fresh out of university in 1989. I held various technical and management positions in the Support and IT divisions there and spent most of my time designing, building, or maintaining database applications in areas such as class registration, order entry, commissions, financial reconciliation and reporting, and Oracle's Trading Community Architecture product.
The First Snippet
Throughout my time at Oracle one of the things I enjoyed most was answering "how to" questions. I think it started as early as my second month on the job when a customer asked me how to print column data horizontally instead of vertically. I asked one of my co-workers if he knew how to do it and his reply was something like "that's impossible, can't be done." Well as one of my managers once observed, "if you want something done just tell Joe it's impossible." So being the kind of guy I am I did a little experimenting and came up with an answer, a somewhat convoluted one, but an answer none the less. After investing time in the solution though I thought it would be a waste to simply use it to close one support call and then move on. After all, there had to be more than one customer with the same requirement. I decided to write the answer up as a small, generic case study. The next time anyone asked the same question I would be ready with a canned answer. Sure enough, that little case study came in handy (the original document is here at "Printing Records Horizontally," in case you are interested). Whenever a customer asked about printing rows horizontally I faxed them that canned answer right away. When someone from marketing asked for tips and tricks for a newsletter I pulled out the case study and it got published. Every couple of years someone asked about horizontal printing on an internal mailing list and I replied, case study attached. It felt good knowing that one little SELECT statement I developed was helping so many people.
I did the same thing for other topics over the years, but as time marched on I moved from the Support division to IT and was no longer able to help customers with their "how to" questions. As well the internal help mailing lists started to become busy with more DBA questions and less SQL "how to" questions so I unsubscribed from them to keep my Inbox under control. My little how-to tips were making it to a smaller and smaller audience. Then the Internet came along.
As the Internet grew I watched as discussion forums like those on the Oracle Technology Network (OTN) took off. What a great idea. Anyone in the world could broadcast their questions to knowledgeable people around the globe, get a quick answer, and then that answer remained available for all to see in the future. That sure beats phone calls and mailing lists.
I also stumbled across Tom Kyte's Ask Tom web site. I remembered Tom from the mid 90's when we were both on the same internal mailing lists. I think he may have even complimented me on some of my solutions. Little did I know that co-worker would go on to become the equivalent of a SQL rock star. His work inspired me. In the back of my mind I decided I wanted to do something similar to Ask Tom someday, but I never had time to seriously tackle it, aside from dabbling with a few posts on the OTN "SQL and PL/SQL" forum.
One Door Closes, Another Opens
I never had time that is, until February 2006 when I was laid-off and my 17 year career at Oracle came to an end. After the initial sting wore off, it occurred to me the time had come to stop thinking about that how-to project and start doing it.
Up until that point I was never sure what approach to take though. I could write a book, but given that I stopped buying inch thick programming books myself many years earlier in favour of using the web it did not seem like the right way to go. I could start a discussion forum for SQL questions and answers, but there are plenty of good ones around already and, being the data normalization freak that I am, I knew I would grow frustrated seeing the same questions asked and answered over and over again. I could create a shareware utility that incorporated best practices code into a database programming toolkit, but the scope of that project seemed a little too broad and vague for one guy to tackle.
On the day I was laid-off the answer became crystal clear. I would take the best parts of all three ideas and roll them into one. I would write a book, publish it on the web, and fill it with lots of practical SQL code snippets, like my old "Printing Records Horizontally" solution. Imagine a forum where you only had to read one thread to find all the answers to one question. Imagine a free programming book you could search through electronically and then cut and paste the code you found into your favourite test system. Imagine a place where you could talk about a topic, or read what others have to say about that topic, without weeding through duplicate or outdated solutions, untested ideas, irrelevant information, flame wars, and spam. That is my vision for SQL Snippets. This site is the result.
The journey has just begun. I hope you will join me for the ride. Thank-you for visiting.
Well, it's been exactly one year since SQL Snippets first appeared on the web as a prototype site containing 33 pages viewed by a handful of visitors in its first month (a few close friends and the occasional searchbot). It now has over 250 pages, RSS feeds, site search, and HaloScan commenting. It gets thousands of visitors each month from around the globe (including the loyal searchbots, we've become steady friends this past year) and has been blogged about, StumbleUpon'd, and del.icio.us'd. (*ouch*) I'd like to say a big THANK-YOU to all of you who helped spread the word about SQL Snippets or provided feedback about the site in its first year. Your efforts are much appreciated.
The last year has seen a big change in my career as well. Some of you may have noticed the rate of new SQL Snippets topics started dwindling back in July. That's because I went back to work for Oracle that month and no longer have the luxury of working on this site full time. I'm doing pretty much the same job I had when I last worked there in 2006. In fact, I was even re-assigned some of the projects I worked on during my prior stint and they're exactly the way I left them. Some things never change, literally.
Fear not though, I still plan on adding new content when I can. The content management system I built for this site is effectively complete now so, unlike the past 12 months, I won't need to spend too much time on the mechanics of the site and can focus mostly on content going forwards. In fact, I even managed to put together a quick page on a new 11g feature this weekend. Check it out at Columns to Rows: UNPIVOT (11g).
Time for some cake ...