Entries Tagged as 'oracle'

Saturday, January 16th, 2010

Oracle Delete Taking a Long Time

It may look like your delete statement is hung, but ff your table has foreign keys in another table without indexes on that column Oracle will full table scan that other table for every row that you’re deleting. Hopefully this saves someone some time.
Bookmark to:

Tuesday, October 6th, 2009

Luhn Digit Generation Oracle PL/SQL Implementation

Here's how to generate a Luhn Mod-10 Check Digit. It's implemented as a function in oracle PL/SQL. I spent 2 hours looking for this online, then decided to implement it myself since it's not that hard. Anyway, I thought I'd post it here for the next person trolling google for it. This is useful for [...]

Monday, July 9th, 2007

Great Alternative Oracle Site

During the last week or so I've been going through the process of setting up an Oracle 10g database on CentOS 4.5. Rather than relying on the toads at OTN or the raving throngs of confusion at the oracle.com forums for advice. I learned everything I needed to know at Dizwell Informatics. It's the site [...]

Wednesday, July 4th, 2007

$ORACLE_HOME permissions

For some reason in the latest 10g oracle download for linux they fubared the perms for the $ORACLE_HOME directory, not allowing non-oracle users to run any oracle client tools like sqlplus. Causing awesome errors like:
sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory
Also this completely broke oci8 [...]

Wednesday, June 20th, 2007

Randomizing Query Results in Oracle

I was doing some work this afternoon, and I needed some sample id's from a database query, however all the data ended up being related to the same person because of the ordering of the results. There must be a better way, i want random results in my resultset.
Here's how (in oracle), order by a [...]

Friday, March 16th, 2007

Accessing main query aliases from subquery

I am stupid, I never fully understood Oracle Subqueries. Let me give you an example, I had a really big view where I wanted to access stats of child tables based on a parent table.
For example, let's call that table checks, I wanted to know how many responses were linked to each check. We have [...]

Monday, October 9th, 2006

Formatting Numbers in Oracle and Postgres

When dealing with large numbers in oracle sometimes it can be hard to read the results from a query with no formatting in the results. I know I have misread numbers from a query many times. Well, I finally got around to looking up how to format numbers in oracle. And who knew -- TO_CHAR [...]