Category Archives: SQL

Using inline views to achieve SPOD

If you are wondering what SPOD is, then check out this blog post by Steven Feuerstein. Suppose you want to create a SQL statement (for a view or cursor or something else) where you want the value of one mathematical function to be used as input for another mathematical function. For simplicity reasons I am just using some […]

Read more

QDA on tables…

When you are implementing the QDA in an existing application, you may want to know what tables have the QDA implemented and what tables don’t have it implemented yet. I have created two SQL statements that retrieve this information from the data dictionary.

Read more

Oracle errors…

I’m sure everybody ran into an error of some sort when using Oracle. Some errors are really obvious, you are trying to select a column that doesn’t exist, assigning a variable that hasn’t been declared, that kind of errors. But there are also errors that you don’t run into that often, maybe it’s even the […]

Read more

Not much happening…

Lately I’ve been doing lots of production work at the customers site, so there’s not really much that involves new techniques etc. I did however come up with a nice solution to a small problem I faced. Order results by the last character. In normal SQL you can do an Order by to order by […]

Read more

Ansi SQL vs Oracle SQL

Today I was wondering about whether we should be using Ansi SQL instead of the 'normal' Oracle SQL. Ansi SQL has been supported in Oracle since version 9i, but since we are still developing applications on Oracle 8i we haven't really given it much thought until now. We are migrating our development database to Oracle9i […]

Read more

Oracle SQL Developer also for MySQL

This post on Download Squad pointed me to trying Oracle SQL Developer to connect to my MySQL database on this website. After unpacking the download, I tried to connect but apparently I needed some extra software to connect to MySQL. This link on the Oracle site shows the following table. It appears that the needed jar files […]

Read more

Defaults

Oracle 9i and up provide you with a new keyword: DEFAULT. This means you can get to the default values of a column when doing an insert or update. I have tried some things with this on my 10G XE database and I have come up with the following script to test it all (a […]

Read more