Archive for July, 2005

Company Picnic

Every summer, the company I work for organizes a picnic for all its employees. This year, it was in Alderbrook Park. The weather was a little on the hot side but comfortable. We had fun, especially my son George. I took a few pictures too.

Random string generator

If you’ve ever wanted to generate a random password, a random number, or just a random string, dbms_random is here to help. Here is an example of the different uses of this useful package:

Read The Fabulous Manual

I have learned a lot just by reading the manuals. Since the beginning of times, I have always had the following two links in my bookmarks, and I urge you to do the same.

Oracle Documentation at http://tahiti.oracle.com/ ColdFusion Documentation at http://livedocs.macromedia.com/coldfusion/

Oracle PLSQL in CFQUERY

Sometimes, you may want to execute an anonymous PL/SQL block directly from within the CFQUERY tag instead of calling a stored procedure or function. So you write this (simplified) code in your ColdFusion template:

Wayback When

I found this the other day and I thought it was cool. The Internet Archive Wayback Machine is a service that allows people to visit archived versions of Web sites. Visitors to the Wayback Machine can type in a URL, select a date range, and then begin surfing on an archived version of the Web. […]

Paging through a query result

The following query gets all of the rows between LowerBound and HigherBound from the ordered result set in the innermost query. This only works with Oracle8i, release 8.1 and up (order by in sub-queries not recognized until then). I used the data dictionary table all_objects as an example, you can put your own query there.

Writing/Reading images to/from DB

In ColdFusion it is very simple and straight forward to store and retrieve images to/from an Oracle database. Here is an example of how you can do it:

Patching for ever

This is the state of the software industry as it is today and always will be:

via

Query returning individual chars

Here is a query that puts each character of a given string in its own row:

Oracle REF CURSOR and ColdFusion

So you have an Oracle function (not a procedure) that returns a REF CURSOR and you want to use that function in ColdFusion. That can be easily done using <cfstoredproc>. Here is an example: