I have reviewed the latest edition of Oracle PL/SQL Programming. This is not a book, at least for me, that I would read front to back. I use it mostly as a reference, but the great thing about this book is that you can also use this book to learn programming PL/SQL from scratch.
The book is nicely ordered into different parts, like Program structure and how to use SQL in PL/SQL (which by the (more...)
Suppose you have data in your PL/SQL program stored in a collection. I am using the EMP table (14 records) but you should imagine you have many, many more records in your collection. If you want to order (sort) your collection in a different manner somewhere in your code you can of course write your own sorting routine but the Oracle database is doing this for ages and probably a lot smarter (after all these (more...)
|Text for bots: Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience.|
Consider this scenario of dynamic actions on change of P42_ITEM:
|Synchronous vs Asynchronous server calls|
Below you will find an overview of all the sessions that took place at the AMIS25 Beyond the Horizon conference (1-3 June 2016, Katwijk, The Netherlands) along with the associated session resources – such as the presentation slides and where applicable the source code.
||Deploy with joy: automate the build and deployment of your ADF Fusion application|
||Ultimate Node.js countdown the coolest APEX examples|
One of the new features with Oracle database 12c is the new syntax for Top N queries and pagination. Did we really need this? Should you choose for the new syntax over the way we used to do it, with an inline view? I think so, it simply adds syntactic clarity to the query, and in this blogpost I will show the difference between the "old" and the "new".
For the examples I will use (more...)
Then a question arose (as a comment):
What if for example i have 42 records and i wish to divide 100 by 42. I would get a rounded value of 2.38. If (more...)
What happens when you can’t get a PL/SQL Web Toolkit to work because it only prints to a web page? That’s more tedious because any
dbms_output.put_line command you embed only prints to a SQL*Plus session. The answer is quite simple, you create a test case and test it inside a SQL*Plus environment.
Here’s a sample web page that fails to run successfully …
1 2 3 4 5 6 7 8 9 10 11 (more...)
In Part 1 we saw that the SQL function COLLECT with the DISTINCT option is not natively supported in PL/SQL.
One suggested workaround was to apply the SET function on the result of the “simple” COLLECT function (without the DISTINCT option).
This works fine, in both SQL and PL/SQL, as long as the collection type that we use is Nested Table.
create type integer_ntt as table of integer / select person_id,set(cast(collect(project_id) as integer_ntt)) project_id_list (more...)
Almost every valid SQL statement (i.e., that is executed successfully by the SQL engine) can be embedded successfully as a static SQL in PL/SQL. Almost, but not every statement.
One example is the COLLECT aggregate function with the DISTINCT option.
To demonstrate it I’ll use the PROJECT_ASSIGNMENTS table, which contains assignments of people to projects. The same person may be assigned to the same project more than once, in different times.
create table (more...)
This change can make a big impact in the execution time of PL/SQL as it's processed at compile time instead of interpreted at runtime.
Plug-ins can be wonderful black boxes and consumers may not care (more...)
There's more to PL/SQL programs than packages, but most of our code will live in packages. The PL/SQL Reference offers the following benefits of organising our code into packages:
Modularity - we encapsulate logically related components into an easy to understand structure.
Easier Application Design - we can start with the interface in the package specification and code the implementation later.
Hidden Implementation (more...)
Sending emails from the Oracle database can be both simply deceptively braindead easy, and confoundingly perplexingly awful at the same time. Easy, because all you have to do is call one of the supplied mail packages to send an email:
UTL_MAIL.send (sender => 'email@example.com' ,recipients => 'firstname.lastname@example.org' ,subject => 'Test Subject' ,message => 'Test Message');
APEX_MAIL.send (p_from => 'email@example.com' ,p_to => 'firstname.lastname@example.org' ,p_subj => 'Test Subject' ,p_body => 'Test Message'
SELECT SPLIT_PART('A;B;C;D', ';', 2);
The Principle Of Least AstonishmentAlso known as the Principle of Least Surprise, the rule is simple: programs should do what we expect them to (more...)
But developers are users too.
Another developer writing a program which calls a routine in my program is a user of my code (and, I must remember, six months after (more...)