Navigation


Ancient Chinese DBMS (Oracle 8i = teh suck)

Ran into an issue earlier today writing a simple database SQL query. I was trying to run a query like the one below (table/column names changed):

SELECT t.col1, r.col1
FROM schema1.table1 t
LEFT JOIN schema2.table2 r
ON t.col2 = r.col2

And I received an error:

ORA-00933: SQL command not properly ended

I assumed I had some sort of syntax error (I had an additional WHERE clause and some other stuff), so I stripped it down to its barest form shown above and tried again, same result.

I was starting to get pissed off until I realized this client was probably running a really old version of Oracle. So I ran the following code to check it out:

SELECT * FROM v$version

The response came back - 8.1.6.3.0. Some quick googling revealed that Oracle version 8i did not support the ANSI-style joins I was trying to perform (explicitly writing LEFT JOIN). I of course knew Oracle supported its own join syntax, but I usually avoid it to try and keep SQL portable to other database systems. However, I rewrote the query:

SELECT t.col1, r.col1
FROM schema1.table1 t, schema2.table2 r
WHERE t.col2 = r.col2 (+)

And sure enough it worked! No thanks to you Oracle 8i. On a side note, I really hope we upgrade soon... I mean 10g has been out for a while now.

The obvious lesson here is if something seems to be failing even though you KNOW it should be working, don't forget to consider version.

Comments

Archives By Subject


Recent Entries

No recent entries.

Recent Comments

No recent Comments


RSS

RSS Feed


Search