Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> SQL Serious Challenge # 1 - Probably Not Much Fun

SQL Serious Challenge # 1 - Probably Not Much Fun

From: Howard J. Rogers <hjr_at_dizwell.com>
Date: Sat, 13 Mar 2004 06:26:16 +1100
Message-ID: <40520ee0$0$3957$afc38c87@news.optusnet.com.au>


Daniel's low-flying one dimensional birds has got me thinking about how useful SQL can get.

Suppose a table that contains just words up to, say, 8 characters in length, minimum length 4. The words could be anything, but let's just suppose they are composer's name. Hence "BACH" is acceptable, "BRITTEN" is almost perfect, and "STRAVINSKY" is bloody awful and not allowed.

OK. Here's the challenge. What would the SQL look like to select these words at random from the table, and display them randomly packed with other letters, in a 15 x 15 word grid, with the original words being read from left OR right (you know, like in one of those word square games?). One word per line, but not every line should have a word (such lines to have all 15 characters displayed merely at random, therefore).

Something like (without doing the entire 15 x 15 thing!!):

XFEPBACHUILEEWB
BACLNETTIRBORFG
etc etc

Even harder challenge, I think: what would the SQL look like that allows the randomly selected words to be read left, right *and up and down* within the 15 x 15 word square. For example:

TFEPBBDHUILEDSB
IFEPABHHUXLVOWE
RFEPCBRCUIPGEQE
BFEPHBHEUIYAEWT Strictly no Java.

Regards
HJR Received on Fri Mar 12 2004 - 13:26:16 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US