Using Table Functions
Overview of table functions Table functions are functions that produce a collection or rows (either a nested table or a varray) that can be queried like a physical database table. You use a table...
View ArticlePL/SQL vs SQL
There is a ‘rule’, I think it was created by Tom Kyte, stating: If you can do it in SQL, do it in SQL. I came across some code the other day that makes perfect sense to do then you are running an...
View ArticleProcessing large files through SOA Suite using Synchronous File Read
Introduction Reading files using SOA Suite is very easy as the file-adapter is a powerfull adapter. However, processing of large files is less trivial. You don’t want to read the huge file into memory...
View ArticleSQL Challenge – Calculating the legal maximum speed measured by the laser...
The speed of cars can be detected at large distance and with great accuracy using laser speed guns. How the measured speeds translate into speeding tickets depends on the legislation around speeding...
View ArticleSQL Challenge – packing time intervals and merging valid time periods
During the OUGF 2014 Harmony Conference in Finland, I attended a seminar by Chris Date on Temporal Data and the Relational Model. He introduced an approach within the relational model to describe...
View ArticleSQL Challenge – World Cup Football 2014 – Retrieving matches and Calculating...
Few things lend itself so well to SQL explorations as sport related data. The imminent World Cup Football (or Soccer in some deprived parts of the world)2014 in Brazil is no exception. In this...
View ArticleHow to create an if-then-else expression (aka ternary operator) in an XPath...
There are situations where I have to create an XPath expression that performs something like if-then-else logic (similar to a CASE or DECODE expression in SQL or a ternary operator in Java or...
View ArticleSQL Challenge: Find World Cup Football matches with a comeback
As I recently said in another blog post, the World Cup Football is such a wonderful source of data that begs to be digested using SQL in many different ways. While working on a tag cloud producer –...
View ArticleSQL Challenge: Dynamically producing a tag cloud for World Cup Football matches
Tag clouds are a special way to present information about a set of records. Tags are descriptive labels that are associated with specific records. A tag cloud visualizes the various labels that have...
View ArticleSQL Challenge: Drilling down into World Cup Football Tag Cloud
In a previous article, I have introduced the World Cup Football tag cloud (http://technology.amis.nl/2014/06/22/sql-challenge-dynamically-producing-a-tag-cloud-for-world-cup-football-matches/). I have...
View ArticleSQL: combine inline PL/SQL function with inline view in Oracle Database 12c...
Oracle Database 7.3 was the first to support inline views – using the select * from (select * from) syntax. Oracle Database 9i added the with clause for subquery factoring, using a syntax like with vw...
View ArticleSQL> Select * From Alert_XML;
By mapping an external table to some text file, you can view the file contents as if it were data in a database table. External tables are available since Oracle 9i Database, and from Oracle 11gR2...
View ArticleSQL> Select * From Alert_XML_Errors;
Once you are able to show the xml version of the alert log as data in database table Alert_XML, it would be nice to checkout the errors with accompanying timestamps from within view Alert_XML_Errors....
View ArticleFTPS with PL/SQL
Doing a FTP-job with PL/SQL is not difficult. A basic implementation of RFC 959 can be written in a few hundred lines. See for instance ORACLE-BASE, How to FTP with Oracle PL/SQL or Oracle FAQ’s But...
View ArticleUsing Maven to assemble and release artifacts to Nexus
An important part of a release process is storing artifacts in an artifact repository. Many customers use custom implementations of artifact repositories (such as file shares in combination with custom...
View ArticleHow-to set the current database schema of an application using a global context
Question: We have customers who want to work with different database schemas and we want to determine dynamically – depending on a choice during or after login – which database schema the application...
View ArticleUsing an aggregation function to query a JSON-string straight from SQL
Last week I read this blogpost by Scott Wesley. In this post he describes that he uses a custom aggregate function to create large JSON-strings. And for that he used a solution as described in this...
View ArticleExposing JMS queues and topics with a JAX-WS webservice
Share this on .. Everyone can do HTTP calls and thus call most webservices. Interfacing with JMS queues or topics though is a bit more difficult (when not using Oracle SOA Suite). An alternative is...
View ArticleDonderdag 16 april/Thursday April 16th – Speedy Joe’s – Using asynchronous...
Share this on .. De Java SIG (Special Interest Group) van AMIS organiseert op donderdag 16 april een bijeenkomst (publiek toegankelijk) over asynchrone interacties in Java EE (web) applicaties....
View ArticleMake HTTP POST request from Java SE – no frills, no libraries, just plain Java
Share this on .. This article shows a very simple, straightforward example of making an HTTP POST call to a url (http://localhost:8080/movieevents) and sending a JSON payload to that URL. The REST...
View Article