APEX Interactive Grid: Cell Selection as Default
Notes on Oracle
by
1y ago
When you want to copy a specific value from an Interactive Grid, you would need to change Row Selection to Cell Selection in the Actions menu. When you don't want to expose the Actions-menu, or just to make it more convenient for your users, having Cell Selection as the Default might be more convenient. To change this the Default, and set Cell Selection as the Default, add the following code to the Javascript Initialization Code section: function(config) { config.defaultGridViewOptions = { selectCells: true } return config ..read more
Visit website
Parse CSV-file in different Character Set with APEX_DATA_PARSER
Notes on Oracle
by
1y ago
When there are special characters in a CSV-file, and the file is in a different characterset than which you expect, parsing it can give unexpected results. From different suppliers we get CSV-file, which need to be parsed and stored in the database. This is done by using APEX_DATA_PARSER. APEX_DATA_PARSER is very flexible and allows several file-formats: JSON, XML, CSV and even native Excel XLSX. The files are uploaded to the database (in the background) and processed. And this works like a charm,... until... one of the suppliers provided a CSV-file in a different character set, with special c ..read more
Visit website
APEX Calendar showing incorrect Week Number
Notes on Oracle
by
1y ago
The users of our application wanted to have the week number shown as well in the Calendar. This can be easily done with a little bit of JavaScript. In the "Advanced" section of the Region Attributes, the is room to add "JavaScript Initialization Code". The "Help" for this region even shows how to add week numbers in the Calendar: Copy-and-Paste the JavaScript from the Help to the JavaScript Initialization Code and you're done: function ( pOptions) { pOptions.weekNumbers = true; pOptions.weekNumberTitle = "CW "; return pOptions;} However, in our case, it didn't show the correc ..read more
Visit website
Intervals go ISO-8601 #JoelKallmanDay
Notes on Oracle
by
1y ago
Another year, and it's time to write an entry for the #JoelKallmanDay. My recent discovery in Oracle Database 21c, the innovation release, is how intervals can also be in ISO-8601 format. The ISO-8601 format is an international standard for describing Date and Time formats in data exchanges. There are two flavors of interval in the Oracle Database, "Day to Second" and "Year to Month" and there are specialized functions to convert strings in a certain format to an interval. The following example creates a "Day to Second" interval of 4 days, 3 hours, 25 minutes and 42 seconds: SQL> select to ..read more
Visit website
Interactive Grid: Filter on Column that shows an Icon
Notes on Oracle
by
2y ago
For one of our Interactive Grid we wanted to show the status of a column as an icon and still be able to filter on that column. Out of the box this is not possible. When choosing "HTML Expression" it is possible to show an icon in the column values but filtering is no longer possible. When choosing "Text" as the column it is possible to filter on the column, but you can't specify an HTML Expression to format the column values. Let's examine this in a little more detail and also show a solution, provided by Andreas Wismann Let's start with the query that I will use: select p.id as pid ,p ..read more
Visit website
ORA-24017: cannot enable enqueue on QUEUE, %s is an exception queue
Notes on Oracle
by
2y ago
Generating documents can take quite some time, which I prefer to do in the background. To facilitate this we use Advanced Queueing (DBMS_AQ). We place the orders that we want to have a document for in a Queue. There is a callback function on the Queue which will take care of the document generation (we use APEX Office Print). If the above is abacadabra to you, I suggest you read up on DBMS_AQ and callback functions on this blog by Adrian Billington. Normally this works flawlessly, until recently when there was a typo in the URL to call AOP. When the callback function would try to call AOP, it ..read more
Visit website
Modify a JSON structure with a single Update
Notes on Oracle
by
2y ago
Recently there was a question on the Oracle Community Forum related to JSON, more specifically how to change the structure of it. The link to the Question is at the bottom of this post. The starting point is the following JSON: { "tktKey": "123456", "attlist1": [ { "attkey": "123", "attval": "abc" }, { "attkey": "456", "attval": "def" } ], "attlist2": [ { "attkey": "098", "attval": "xyz" } ]} The task at hand was to combine both attlist1 and attlist2 into a single attlist. To do this the JSON object tha ..read more
Visit website
Everybody needs a break: APEX_WEB_SERVICE #JoelKallmanDay
Notes on Oracle
by
2y ago
When Tim Hall announced that there will be a Community blog-day in memory of Joel Kallman, I knew I wanted to participate. For this post, I'll keep it technical (somewhat). I'm old enough to remember what a hassle it was to call a webservice from PL/SQL and now appreciate how easy it is. So, this post is about APEX_WEB_SERVICE. To show how easy it is to work with APEX_WEB_SERVICE and as everybody loves a holiday, I decided to combine the two. There is a webservice which gives you public holidays (per country) which can be found at: https://date.nager.at/. For this example I created a table whi ..read more
Visit website
SQLCL 21.2: APEX LIST Command gives error (and a work around)
Notes on Oracle
by
2y ago
Recently I've upgraded to the latest SQLCl release, currently 21.2, and found a small bug. To quickly export APEX applications I often use the "APEX"-commands in SQLCl. Exporting an APEX application is done by issuing the following command: apex export 1000 where you pass in the number of the application that you want to export. This still works fine, but I don't always remember the application id, so I use "APEX list" to show a list of APEX-applications. This command is failing in this release unfortunatelly. To demonstrate that this is happening: SQL> show versionOracle SQLDeveloper ..read more
Visit website
Automatically Not Null when adding a DEFAULT Clause
Notes on Oracle
by
3y ago
Today I learned something new about the DEFAULT ON NULL clause. Since Oracle database release 12 it is possible to define a DEFAULT ON NULL clause which is used when a NULL is provided as value. The thing I didn't know is that the column is automatically defined as NOT NULL. Is this documented behaviour? Yes, it is. Quote from the documentation: When you specify ON NULL, the NOT NULL constraint and NOT DEFERRABLE constraint state are implicitly specified. SQL> select banner 2 from v$version 3 /BANNER--------------------------------------------------------------------------------Oracle Data ..read more
Visit website

Follow Notes on Oracle on FeedSpot

Continue with Google
Continue with Apple
OR