All posts in 'Oracle'

JDBC: Get autogenerated keys on a Oracle DB

09-Oct-07

With the current and latest Oracle JDBC Drivers it’s possible to retrieve one automatically generated key based on a sequence or any other arbitrary value (autogenerated-keys or identity columns in other databases). Certainly it isn’t as simple as just use using Statement.html#getGeneratedKeys() as it simply returns an emtpy resultset. After browsing around, i saw that […]

Read the complete article »

Simple tokenizing with Oracle PL/SQL

18-Jul-07

I was in need of tokenizing some comma delimited data within an Oracle Database. A pity, there’s no split for a varchar2 like java.lang.String.split. I could have used Java in the database, but that would be lame, too.j I found this little function which uses pipelined results, that is, it returns his results while being […]

Read the complete article »

Using Hibernate with Oracle Spatial

05-Feb-07

Oracle Spatial Datatype JGeometry from the spatial api (which can be found here) can easily be used with hibernate through a custom dialect and a custom type that delegates to an instance from oracle sdo api. Everything that is needed is here: Mapping Spatial Oracle type SDO_GEOMETRY to JGeometry The only quirk with this solution […]

Read the complete article »

On writing binary data from within Oracle Forms 6i

29-Jan-07

There is this nice project of ours from 2002…. developed with Oracle Forms 6i and database PL/SQL Procedures. This project runs fine with an estimated 6gig database. Plain old client server model. We have some XML / XSLT based HTML reports that are processed – thanks to Oracle 9i – directly in the database with […]

Read the complete article »

IS_NUMERIC, IS_NUMBER oder ähnliches…

18-Oct-06

Kann sein, dass es in einem großen Datenbankprodukt namens Oracle keine Methode isNumeric oder ähnliches gibt, die mir sagt, ob ein String eine Zahl repräsentiert? Es kann… Deswegen hier eine kleine Methode: CREATE OR REPLACE FUNCTION f_makeNumber(inval IN VARCHAR2) RETURN NUMBER IS rv NUMBER; numCharSet VARCHAR2(32); BEGIN SELECT VALUE INTO numCharSet FROM nls_session_parameters WHERE parameter […]

Read the complete article »