Send As SMS

Wednesday, September 21, 2005

New book: Object-Oriented Oracle 

If there's a new book with this title it is instantly on my radar. I just had a quick look on it in www.books24x7.com. I did a full text search on the words
I've found: Nothing! Having a look around in the book I came to the conclusion that this is one of these books you won't need if you read the Oracle documentation carefully - It's all there, including examples.

Digg! del.icio.us
(0) comments

Tuesday, September 20, 2005

A little late I just had a look into the LINQ video with Anders Hejlsberg on channel9.msdn.com.

On one side I must say: Ok, these client developers now also can do what we - 'the DB guys' are doing for years using PLSQL, T-SQL, Pro*C and what not: Using sets in a high level set oriented manner instead of multiple loops.

On the other side, being busy in both worlds since years, I must say: Well done! This is the right way to go, this fills a lot of existing gaps in the OO world with paradigms coming from the relational world. I do now have an idea of why Microsoft cancelled the ObjectSpaces project some time ago. Using the results of Hejlsbergs (and others) ideas from Delphi 1 until today (VCL DataSets, .NET DataSets etc.) I'm convinced that I will enjoy working with LINQ.

Digg! del.icio.us
(0) comments

Wednesday, September 14, 2005

SQL: Combining/joining 2 uncorrelated result sets 

Today I needed to generate some test data. I wanted to join 2 uncorrelated result sets having the same number of rows. I couldn't find an easier solution than generating 2 inline views and join them together by rownum.

GeSHi © 2004, Oracle
  1. WITH MyView1 AS (SELECT rownum r,

  2.                         t.*


  3.                   FROM (SELECT dbms_random.value s1 FROM dual connect BY 1=1) t


  4.                   WHERE rownum <= 2

  5.                 ),


  6.      MyView2 AS (SELECT rownum r,

  7.                         t.*


  8.                   FROM (SELECT dbms_random.value s2 FROM dual connect BY 1=1) t


  9.                   WHERE rownum <= 2

  10.                 )


  11. SELECT *

  12. FROM MyView1

  13.   INNER JOIN MyView2 ON (MyView1.r = MyView2.r)
Parsed in 0.055 seconds


Could that be done in a simpler way?

Digg! del.icio.us
(2) comments

This page is powered by Blogger. Isn't yours?

LICENSE