Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL Serious Challenge # 1 - Probably Not Much Fun
Howard J. Rogers wrote:
> 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
>
>
And if you find that too easy, allow them to be read diagonal, both directions, up or down.
TGIF & cheers! Received on Fri Mar 12 2004 - 14:06:17 CST
![]() |
![]() |