I didn't have the patience to figure out a solution in SQL, but could do it another way - one of my favourite solutions is temporary tables, but they bring their own problems.
We had Oracle on the cards a few months ago and so I went [link|http://troels.arvin.dk/db/rdbms/|researching compatibility]. I was surprised that Oracle had so many gotchas. But then there's a certain arrogance from Oracle about The Way To Do Databases, isn't there? :-)
Wade.