BibleGateway.com Verse Of The Day


“ Now Jesus was going up to Jerusalem. On the way, he took the Twelve aside and said to them, “We are going up to Jerusalem, and the Son of Man will be delivered over to the chief priests and the teachers of the law. They will condemn him to death and will hand him over to the Gentiles to be mocked and flogged and crucified. On the third day he will be raised to life!”” (Matthew 20: 17-19)  listen to chapter  (Read by Max McLean. Provided by The Listener's Audio Bible.)

Powered by BibleGateway.com

Monday, September 18, 2006

Outer Joins: Sybase versus Oracle

I've never had the 'pleasure' of dealing with Sybase. I've created databases in Sybase and MS SQL Server (based on Sybase code at one point), but never had to interact with them directly (they were just meta databases for Silverstream servers).

So on a current project I have to convert a bunch of queries in Java code from Sybase to Oracle, as the database has been migrated.

To oversimplify, a right outer join in Sybase might look like this....

SELECT *
FROM table1, table2
WHERE table1.col3 =* table2.col3

And in Oracle it would look more like this...

SELECT *
FROM table1, table2
WHERE table1.col3(+) = table2.col3

For a left outer join, Sybase...

SELECT *
FROM table1, table2
WHERE table1.col3 *= table2.col3

And Oracle...

SELECT *
FROM table1, table2
WHERE table1.col3 = table2.col3(+)

As a side note, when you see something like "SELECT getDate(), ...", the getDate() function is basically the Sybase equivalent of SYSDATE.

No comments: