//AMIS Technology Blog » sql » Page 3

Posts tagged sql

Vacatures bij AMIS services

Oracle RDBMS 10GR1: solution to avoid character encoding in XML with UPDATEXML

On a recent project, I ran into a problem with an XML document, that had to be enclosed within another XML document, generated from a database query. The problem I ran into was the character encoding of the XMLElement function, which eventually was worked around with UPDATEXML.

In this blog post I would like to share with you several attempts to solve this problem, why they failed and the final solution to the problem.

Printing of official documents happened in a separate printing module. Whenever a document needed to be printed, an XML document was generated in a database query and sent to the printing module. Most of the data came from relational database tables, but pieces of standard text were supplied as XML documents by another party… and saved in our database in an XMLType column based on CLOB storage.

Our printing module expected to find these standard text XML documents within a tag in our generated XML document. Also both XML documents, our generated XML and the supplied XML, had different namespaces, this needed to maintained this way. The Oracle database version we were working with was 10.1.0.5.0.

In this post I will use a simplified version of the real XML More >

Vacatures bij AMIS services

Select a blob across a database link, without getting ORA-22992

4

Just a quick blog about a simple trick to select a blob across a database link, especially for a collegue of mine, Harry Dragstra.

Say, you have a table with a blob on a remote database SQL> describe test_blob@xx Name Null? Type ----------------------------------------- -------- ---------------------------- ID NUMBER BLB BLOB

When you use a normal select statement to get all columns you run into an error (more…)

SIG Event

Jouw toekomst als Oracle professional AMIS informatieavond over jouw ontwikkelingspad (28 februari)

0

Als je dit leest en je bent Oracle professional – ontwikkelaar of administrator – is de kans groot dat je jouw carriere bent gestart in de jaren ‘90, in het tijdperk van Oracle7, Oracle Forms en Client/Server applicaties – net voor de opkomst van Java, internet, mobiel en SOA. Misschien ligt je start daar nog wel voor en misschien ben je van een tikje later. Maar in elk geval: je hebt een solide fundament en al vele jaren ervaring in Oracle technologie.

Nu is het 2012. En de afgelopen jaren is de technologie in hoog tempo ontwikkeld. Web 2.0 applicaties en multi-tier architecturen dienden zich aan en SOA, Service Bus en BPM zijn opgekomen. Java is overal – en HTML 5 staat op het punt om Flash en Silverlight te verdringen, in desktop browsers en in mobiele devices. Eindgebruikers worden mondiger en veel-eisender en real-time, push-enabled, BI-gedreven dashboards en multi-channel takenlijsten worden in snel itererende agile-projecten gerealiseerd.

Oracle 11g Database doet alle simpele DBA taken zelf – en de uitdaging voor de Database Administrator is verschoven naar groter en interessanter, zeker als 24/7 beschikbaarheid, virtualisatie en de cloud als infrastructuur More >

SIG Event

Jouw toekomst als Oracle professional – AMIS !!EXTRA!! informatieavond over jouw ontwikkelingspad

0

Als je dit leest en je bent Oracle professional – ontwikkelaar of administrator – is de kans groot dat je jouw carriere bent gestart in de jaren ’90, in het tijdperk van Oracle7, Oracle Forms en Client/Server applicaties – net voor de opkomst van Java, internet, mobiel en SOA. Misschien ligt je start daar nog wel voor en misschien ben je van een tikje later. Maar in elk geval: je hebt een solide fundament en al vele jaren ervaring in Oracle technologie.

Nu is het 2012. En de afgelopen jaren is de technologie in hoog tempo ontwikkeld. Web 2.0 applicaties en multi-tier architecturen dienden zich aan en SOA, Service Bus en BPM zijn opgekomen. Java is overal – en HTML 5 staat op het punt om Flash en Silverlight te verdringen, in desktop browsers en in mobiele devices. Eindgebruikers worden mondiger en veel-eisender en real-time, push-enabled, BI-gedreven dashboards en multi-channel takenlijsten worden in snel itererende agile-projecten gerealiseerd.

Oracle 11g Database doet alle simpele DBA taken zelf – en de uitdaging voor de Database Administrator is verschoven naar groter en interessanter, zeker als 24/7 beschikbaarheid, virtualisatie en de cloud als infrastructuur opduiken. More >

Vacatures bij AMIS services

Factorial in Oracle SQL – using both new Recursive Subquery and classic Connect By approach

5

I regularly teach a masterclass on Oracle SQL. One of the topics I explore in depth is the use of the CONNECT BY query style to perform not just hierarchical queries but also networking or even generic recursive SQL. In Oracle Database 11g, the recursive subquery was formally introduced, the SQL Standard’s approach to this style of querying. The Recursive Subquery even stronger suggest recursive operations to be performed of course, but classic connect by can do that job as well.

One archetypical example of a recursive operation is the calculation of a factorial: n! = 1* 2 * 3 *…. * (n-1) * n.

In this short post I will show both the new, straightforward 11g based solution as well as the classic approach with CONNECT BY – that may not looks as recursive, but still very much is.

(more…)

SIG Event

Weird ADF 11g requirement addressed with left outer join and modern SQL join syntax

0

The functional requirement was a little unusual. The page should either show all master-records or – depending on the value of a parameter – it should show exactly one master-record joined with exactly one detail-record. The use case was valid – that was exactly the functionality that was required.

In terms of EMP and DEPT -I like to always simplify things to express them in EMP and DEPT terms – , we should either see all Departments (and no Employee data) or we should see the data for a specific Employee joined with the data for its corresponding Department. And of course we just one to create a single page, and make it as simple as possible to create that page.

A simplistic page that supports this functionality could like this:

when a specific Employee is requested and

when all Departments should be shown, because no single Employee is asked for.

(more…)

Go to Top